]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
pytest: fix check for slow_network skips to only apply when intended
authorStefan Eissing <stefan@eissing.org>
Tue, 5 Sep 2023 07:10:00 +0000 (09:10 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 5 Sep 2023 12:10:01 +0000 (14:10 +0200)
Closes #11801

tests/http/test_02_download.py
tests/http/test_04_stuttered.py
tests/http/test_08_caddy.py

index 38db3372bb21488f255e42065e82f8f14c57e446..d6bfe9cd364b77f66ce51e72718ef1da3e2af0ce 100644 (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
index 41dc55992a24adb8c61377cdb2047317cbb341e3..818d333a93a6ee8c4ba72cc9159af11b205bc2a5 100644 (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')
index 0faba9b4ef0b020a3ae09c7a0cd10323a8a2f822..aa69e620ed85b03b4dae992760473d5543de16fb 100644 (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):