Adding upstream version 2.4.63.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
This commit is contained in:
parent
93c6f9029a
commit
7263481e48
3104 changed files with 900776 additions and 0 deletions
31
test/conftest.py
Normal file
31
test/conftest.py
Normal file
|
@ -0,0 +1,31 @@
|
|||
import sys
|
||||
import os
|
||||
|
||||
import pytest
|
||||
|
||||
sys.path.append(os.path.join(os.path.dirname(__file__), '.'))
|
||||
|
||||
from pyhttpd.env import HttpdTestEnv
|
||||
|
||||
def pytest_report_header(config, startdir):
|
||||
env = HttpdTestEnv()
|
||||
return f"[apache httpd: {env.get_httpd_version()}, mpm: {env.mpm_module}, {env.prefix}]"
|
||||
|
||||
def pytest_addoption(parser):
|
||||
parser.addoption("--repeat", action="store", type=int, default=1,
|
||||
help='Number of times to repeat each test')
|
||||
parser.addoption("--all", action="store_true")
|
||||
|
||||
|
||||
def pytest_generate_tests(metafunc):
|
||||
if "repeat" in metafunc.fixturenames:
|
||||
count = int(metafunc.config.getoption("repeat"))
|
||||
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)
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue