mirror of
https://github.com/curl/curl.git
synced 2025-01-18 14:04:30 +08:00
pytest: fix check for slow_network skips to only apply when intended
Closes #11801
This commit is contained in:
parent
dd5999b686
commit
a8a82140aa
@ -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
|
||||
|
@ -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')
|
||||
|
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user