← Commit list

b81d30ade3

Viktor Szakats
Viktor Szakats
2025-11-10
SUCCESS Duration: 144s

Subject

pytest: fix conditions for test_02_28

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

tests/http/test_02_download.py+3 -1
@@ -581,7 +581,9 @@ class TestDownload:
@pytest.mark.parametrize("proto", ['http/1.1', 'h2', 'h3'])
def test_02_28_get_compressed(self, env: Env, httpd, nghttpx, proto):
- if not env.have_h2_curl():
+ if not env.have_compressed_curl():
+ pytest.skip("--compressed not supported")
+ if proto == 'h2' and not env.have_h2_curl():
pytest.skip("h2 not supported")
if proto == 'h3' and not env.have_h3():
pytest.skip("h3 not supported")
tests/http/testenv/env.py+6 -0
@@ -406,6 +406,12 @@ class Env:
def have_h3_curl() -> bool:
return 'http3' in Env.CONFIG.curl_props['features']
+ @staticmethod
+ def have_compressed_curl() -> bool:
+ return 'brotli' in Env.CONFIG.curl_props['libs'] or \
+ 'zlib' in Env.CONFIG.curl_props['libs'] or \
+ 'zstd' in Env.CONFIG.curl_props['libs']
+
@staticmethod
def curl_uses_lib(libname: str) -> bool:
return libname.lower() in Env.CONFIG.curl_props['libs']