Skip HTTP Connect proxy tests for websockets if using PyPy

This commit is contained in:
coletdjnz 2024-05-18 16:24:36 +12:00
parent 8c0d5041df
commit 66a8530617
No known key found for this signature in database
GPG key ID: 91984263BB39894A

View file

@ -392,6 +392,9 @@ class TestHTTPProxy:
('Websockets', 'ws'), ('Websockets', 'ws'),
('Websockets', 'wss') ('Websockets', 'wss')
], indirect=True) ], indirect=True)
@pytest.mark.skip_handler_if(
'Websockets', lambda _: platform.python_implementation() == 'PyPy',
'PyPy sometimes fails with these tests, unknown reason')
class TestHTTPConnectProxy: class TestHTTPConnectProxy:
def test_http_connect_no_auth(self, handler, ctx): def test_http_connect_no_auth(self, handler, ctx):
with ctx.http_server(HTTPConnectProxyHandler) as server_address: with ctx.http_server(HTTPConnectProxyHandler) as server_address: