From 82cceaed3130c37d6cb68ef6b4258318a9aea663 Mon Sep 17 00:00:00 2001 From: coletdjnz Date: Sat, 18 May 2024 16:44:40 +1200 Subject: [PATCH] Only skip wss tests --- test/test_http_proxy.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/test_http_proxy.py b/test/test_http_proxy.py index f628a8813..63fe94405 100644 --- a/test/test_http_proxy.py +++ b/test/test_http_proxy.py @@ -394,8 +394,10 @@ def test_http_with_idn(self, handler, ctx): ('Websockets', 'wss') ], indirect=True) @pytest.mark.skip_handler_if( - 'Websockets', lambda _: platform.python_implementation() == 'PyPy', - 'PyPy sometimes fails with these tests, unknown reason') + 'Websockets', lambda request: + (platform.python_implementation() == 'PyPy' + and request.getfixturevalue('ctx').REQUEST_PROTO == 'wss'), + 'PyPy sometimes fails with wss tests, unknown reason') class TestHTTPConnectProxy: def test_http_connect_no_auth(self, handler, ctx): with ctx.http_server(HTTPConnectProxyHandler) as server_address: