pytest: fix check for slow_network skips to only apply when intended

Closes #11801
This commit is contained in:
Stefan Eissing 2023-09-05 09:10:00 +02:00 committed by Daniel Stenberg
parent dd5999b686
commit a8a82140aa
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
3 changed files with 7 additions and 7 deletions

View File

@ -200,7 +200,7 @@ class TestDownload:
])
r.check_response(count=count, http_status=200)
@pytest.mark.skipif(condition=Env.slow_network, reason="not suitable for slow network tests")
@pytest.mark.skipif(condition=Env().slow_network, reason="not suitable for slow network tests")
@pytest.mark.parametrize("proto", ['http/1.1', 'h2', 'h3'])
def test_02_10_10MB_serial(self, env: Env,
httpd, nghttpx, repeat, proto):
@ -212,7 +212,7 @@ class TestDownload:
r = curl.http_download(urls=[urln], alpn_proto=proto)
r.check_response(count=count, http_status=200)
@pytest.mark.skipif(condition=Env.slow_network, reason="not suitable for slow network tests")
@pytest.mark.skipif(condition=Env().slow_network, reason="not suitable for slow network tests")
@pytest.mark.parametrize("proto", ['h2', 'h3'])
def test_02_11_10MB_parallel(self, env: Env,
httpd, nghttpx, repeat, proto):
@ -254,7 +254,7 @@ class TestDownload:
])
r.check_response(count=count, http_status=200)
@pytest.mark.skipif(condition=Env.slow_network, reason="not suitable for slow network tests")
@pytest.mark.skipif(condition=Env().slow_network, reason="not suitable for slow network tests")
def test_02_20_h2_small_frames(self, env: Env, httpd, repeat):
# Test case to reproduce content corruption as observed in
# https://github.com/curl/curl/issues/10525

View File

@ -35,7 +35,7 @@ from testenv import Env, CurlClient
log = logging.getLogger(__name__)
@pytest.mark.skipif(condition=Env.slow_network, reason="not suitable for slow network tests")
@pytest.mark.skipif(condition=Env().slow_network, reason="not suitable for slow network tests")
class TestStuttered:
@pytest.fixture(autouse=True, scope='class')

View File

@ -110,7 +110,7 @@ class TestCaddy:
assert r.total_connects == 1, r.dump_logs()
# download 5MB files sequentially
@pytest.mark.skipif(condition=Env.slow_network, reason="not suitable for slow network tests")
@pytest.mark.skipif(condition=Env().slow_network, reason="not suitable for slow network tests")
@pytest.mark.parametrize("proto", ['h2', 'h3'])
def test_08_04a_download_10mb_sequential(self, env: Env, caddy: Caddy,
repeat, proto):
@ -125,7 +125,7 @@ class TestCaddy:
r.check_response(count=count, http_status=200, connect_count=1)
# download 10MB files sequentially
@pytest.mark.skipif(condition=Env.slow_network, reason="not suitable for slow network tests")
@pytest.mark.skipif(condition=Env().slow_network, reason="not suitable for slow network tests")
@pytest.mark.parametrize("proto", ['h2', 'h3'])
def test_08_04b_download_10mb_sequential(self, env: Env, caddy: Caddy,
repeat, proto):
@ -140,7 +140,7 @@ class TestCaddy:
r.check_response(count=count, http_status=200, connect_count=1)
# download 10MB files parallel
@pytest.mark.skipif(condition=Env.slow_network, reason="not suitable for slow network tests")
@pytest.mark.skipif(condition=Env().slow_network, reason="not suitable for slow network tests")
@pytest.mark.parametrize("proto", ['http/1.1', 'h2', 'h3'])
def test_08_05_download_1mb_parallel(self, env: Env, caddy: Caddy,
repeat, proto):