Skip to content

Commit 1d7ba6c

Browse files
committed
modern python fixes:
- rename hook parameter, because python thought this is a super good idea - change call property to method because it no longer worked git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1933904 13f79535-47bb-0310-9956-ffa450edef68
1 parent 8f43e25 commit 1d7ba6c

40 files changed

Lines changed: 39 additions & 40 deletions

test/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
from pyhttpd.env import HttpdTestEnv
99

10-
def pytest_report_header(config, startdir):
10+
def pytest_report_header(config, start_path):
1111
env = HttpdTestEnv()
1212
return f"[apache httpd: {env.get_httpd_version()}, mpm: {env.mpm_module}, {env.prefix}]"
1313

test/modules/core/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
sys.path.append(os.path.join(os.path.dirname(__file__), '../..'))
1111

1212

13-
def pytest_report_header(config, startdir):
13+
def pytest_report_header(config, start_path):
1414
env = CoreTestEnv()
1515
return f"core [apache: {env.get_httpd_version()}, mpm: {env.mpm_module}, {env.prefix}]"
1616

test/modules/http1/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from .env import H1TestEnv
1010

1111

12-
def pytest_report_header(config, startdir):
12+
def pytest_report_header(config, start_path):
1313
env = H1TestEnv()
1414
return f"mod_http [apache: {env.get_httpd_version()}, mpm: {env.mpm_module}, {env.prefix}]"
1515

test/modules/http2/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from .env import H2TestEnv
1010

1111

12-
def pytest_report_header(config, startdir):
12+
def pytest_report_header(config, start_path):
1313
env = H2TestEnv()
1414
return f"mod_h2 [apache: {env.get_httpd_version()}, mpm: {env.mpm_module}, {env.prefix}]"
1515

test/modules/http2/env.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ def _setup_data_1k_1m(self):
6464
class H2TestEnv(HttpdTestEnv):
6565

6666
@classmethod
67-
@property
6867
def is_unsupported(cls):
6968
mpm_module = f"mpm_{os.environ['MPM']}" if 'MPM' in os.environ else 'mpm_event'
7069
return mpm_module == 'mpm_prefork'

test/modules/http2/test_001_httpd_alive.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from .env import H2Conf, H2TestEnv
44

55

6-
@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
6+
@pytest.mark.skipif(condition=H2TestEnv.is_unsupported(), reason="mod_http2 not supported here")
77
class TestBasicAlive:
88

99
@pytest.fixture(autouse=True, scope='class')

test/modules/http2/test_002_curl_basics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from .env import H2Conf, H2TestEnv
44

55

6-
@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
6+
@pytest.mark.skipif(condition=H2TestEnv.is_unsupported(), reason="mod_http2 not supported here")
77
class TestCurlBasics:
88

99
@pytest.fixture(autouse=True, scope='class')

test/modules/http2/test_003_get.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from .env import H2Conf, H2TestEnv
55

66

7-
@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
7+
@pytest.mark.skipif(condition=H2TestEnv.is_unsupported(), reason="mod_http2 not supported here")
88
class TestGet:
99

1010
@pytest.fixture(autouse=True, scope='class')

test/modules/http2/test_004_post.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from .env import H2Conf, H2TestEnv
1313

1414

15-
@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
15+
@pytest.mark.skipif(condition=H2TestEnv.is_unsupported(), reason="mod_http2 not supported here")
1616
class TestPost:
1717

1818
@pytest.fixture(autouse=True, scope='class')

test/modules/http2/test_005_files.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def mk_text_file(fpath: str, lines: int):
1515
fd.write("\n")
1616

1717

18-
@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
18+
@pytest.mark.skipif(condition=H2TestEnv.is_unsupported(), reason="mod_http2 not supported here")
1919
class TestFiles:
2020

2121
URI_PATHS = []

0 commit comments

Comments
 (0)