diff options
author | Stefan Eissing <icing@apache.org> | 2023-06-28 13:03:29 +0200 |
---|---|---|
committer | Stefan Eissing <icing@apache.org> | 2023-06-28 13:03:29 +0200 |
commit | faefe15c12725e7cad217e017aaa311d2d6e0046 (patch) | |
tree | 2816a26df17d695ac7e9a411c24052e6822e1bd1 /test | |
parent | act more like pre-r1908097 with rewrite (diff) | |
download | apache2-faefe15c12725e7cad217e017aaa311d2d6e0046.tar.xz apache2-faefe15c12725e7cad217e017aaa311d2d6e0046.zip |
tests: add the websockets python module version checks needed for our CI infra
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1910654 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test')
-rw-r--r-- | test/modules/http2/test_800_websockets.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/modules/http2/test_800_websockets.py b/test/modules/http2/test_800_websockets.py index 2afa45edc3..754ac00d62 100644 --- a/test/modules/http2/test_800_websockets.py +++ b/test/modules/http2/test_800_websockets.py @@ -5,8 +5,10 @@ import shutil import subprocess import time from datetime import timedelta, datetime +import packaging.version import pytest +import websockets from pyhttpd.result import ExecResult from pyhttpd.ws_util import WsFrameReader, WsFrame @@ -15,6 +17,9 @@ from .env import H2Conf, H2TestEnv log = logging.getLogger(__name__) +ws_version = packaging.version.parse(websockets.version.version) +ws_version_min = packaging.version.Version('10.4') + def ws_run(env: H2TestEnv, path, authority=None, do_input=None, inbytes=None, send_close=True, timeout=5, scenario='ws-stdin', @@ -80,6 +85,8 @@ def ws_run(env: H2TestEnv, path, authority=None, do_input=None, inbytes=None, @pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here") @pytest.mark.skipif(condition=not H2TestEnv().httpd_is_at_least("2.5.0"), reason=f'need at least httpd 2.5.0 for this') +@pytest.mark.skipif(condition=ws_version < ws_version_min, + reason=f'websockets is {ws_version}, need at least {ws_version_min}') class TestWebSockets: @pytest.fixture(autouse=True, scope='class') |