diff options
Diffstat (limited to 'dev-python/werkzeug/files/werkzeug-3.0.2-pytest-xprocess-1.patch')
-rw-r--r-- | dev-python/werkzeug/files/werkzeug-3.0.2-pytest-xprocess-1.patch | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/dev-python/werkzeug/files/werkzeug-3.0.2-pytest-xprocess-1.patch b/dev-python/werkzeug/files/werkzeug-3.0.2-pytest-xprocess-1.patch new file mode 100644 index 000000000000..3993b0847957 --- /dev/null +++ b/dev-python/werkzeug/files/werkzeug-3.0.2-pytest-xprocess-1.patch @@ -0,0 +1,21 @@ +diff --git a/tests/conftest.py b/tests/conftest.py +index b73202cd..905f3f4b 100644 +--- a/tests/conftest.py ++++ b/tests/conftest.py +@@ -107,10 +107,12 @@ def dev_server(xprocess, request, tmp_path): + # Unbuffered output so the logs update immediately. + env = {**os.environ, "PYTHONPATH": str(tmp_path), "PYTHONUNBUFFERED": "1"} + +- @cached_property +- def pattern(self): +- client.request("/ensure") +- return "GET /ensure" ++ def startup_check(self): ++ try: ++ client.request("/ensure") ++ return True ++ except (ConnectionRefusedError, FileNotFoundError): ++ return False + + # Each test that uses the fixture will have a different log. + xp_name = f"dev_server-{request.node.name}" |