summaryrefslogtreecommitdiff
path: root/test/conftest.py
diff options
context:
space:
mode:
authorStefan Eissing <icing@apache.org>2022-09-21 11:03:44 +0000
committerStefan Eissing <icing@apache.org>2022-09-21 11:03:44 +0000
commitcbb10f366c95401b717e26791d31f1d084dee195 (patch)
tree029cf85d2385294f8e87b6ee07c03e8f385382b5 /test/conftest.py
parent4ef081eddf3b243bb7f7fbdbf4750b451c052840 (diff)
downloadhttpd-cbb10f366c95401b717e26791d31f1d084dee195.tar.gz
*) tests: load the top-level mod_aptest in all test suites.
- aptest logs the test name from the header 'AP-Test-Name' with the request line. LogLevel aptest:info is switched on. - pytest sets 'AP-Test-Name' for all curl/nghttp invocation against the server. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1904188 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/conftest.py')
-rw-r--r--test/conftest.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/conftest.py b/test/conftest.py
index 3472e969f2..2ae35f34ed 100644
--- a/test/conftest.py
+++ b/test/conftest.py
@@ -1,6 +1,8 @@
import sys
import os
+import pytest
+
sys.path.append(os.path.join(os.path.dirname(__file__), '.'))
from pyhttpd.env import HttpdTestEnv
@@ -21,4 +23,9 @@ def pytest_generate_tests(metafunc):
metafunc.fixturenames.append('tmp_ct')
metafunc.parametrize('repeat', range(count))
+@pytest.fixture(autouse=True, scope="function")
+def _function_scope(env, request):
+ env.set_current_test_name(request.node.name)
+ yield
+ env.set_current_test_name(None)