diff --git a/pkgs/development/python-modules/uvloop/default.nix b/pkgs/development/python-modules/uvloop/default.nix index f5d0e08cbb288..15c35549bff74 100644 --- a/pkgs/development/python-modules/uvloop/default.nix +++ b/pkgs/development/python-modules/uvloop/default.nix @@ -61,6 +61,9 @@ buildPythonPackage rec { "--deselect=tests/test_process.py::Test_UV_Process::test_process_streams_redirect" "--deselect=tests/test_process.py::Test_AIO_Process::test_process_streams_redirect" ] + ++ lib.optionals (pythonOlder "3.11") [ + "--deselect=tests/test_tcp.py::Test_UV_TCPSSL::test_create_connection_ssl_failed_certificat" + ] ++ lib.optionals (stdenv.hostPlatform.isDarwin) [ # Segmentation fault "--deselect=tests/test_fs_event.py::Test_UV_FS_EVENT_RENAME::test_fs_event_rename" diff --git a/pkgs/development/python-modules/websockets/default.nix b/pkgs/development/python-modules/websockets/default.nix index 907024735afb2..918cb54ae5a68 100644 --- a/pkgs/development/python-modules/websockets/default.nix +++ b/pkgs/development/python-modules/websockets/default.nix @@ -24,26 +24,31 @@ buildPythonPackage rec { nativeBuildInputs = [ setuptools ]; - patchPhase = '' - # Disable all tests that need to terminate within a predetermined amount of - # time. This is nondeterministic. - sed -i 's/with self.assertCompletesWithin.*:/if True:/' \ - tests/legacy/test_protocol.py - - # Disables tests relying on tight timeouts to avoid failures like: - # File "/build/source/tests/legacy/test_protocol.py", line 1270, in test_keepalive_ping_with_no_ping_timeout - # ping_1_again, ping_2 = tuple(self.protocol.pings) - # ValueError: too many values to unpack (expected 2) - for t in \ - test_keepalive_ping_stops_when_connection_closing \ - test_keepalive_ping_does_not_crash_when_connection_lost \ - test_keepalive_ping \ - test_keepalive_ping_not_acknowledged_closes_connection \ - test_keepalive_ping_with_no_ping_timeout \ - ; do - sed -i "s/def $t(/def skip_$t(/" tests/legacy/test_protocol.py - done - ''; + patchPhase = + '' + # Disable all tests that need to terminate within a predetermined amount of + # time. This is nondeterministic. + sed -i 's/with self.assertCompletesWithin.*:/if True:/' \ + tests/legacy/test_protocol.py + + # Disables tests relying on tight timeouts to avoid failures like: + # File "/build/source/tests/legacy/test_protocol.py", line 1270, in test_keepalive_ping_with_no_ping_timeout + # ping_1_again, ping_2 = tuple(self.protocol.pings) + # ValueError: too many values to unpack (expected 2) + for t in \ + test_keepalive_ping_stops_when_connection_closing \ + test_keepalive_ping_does_not_crash_when_connection_lost \ + test_keepalive_ping \ + test_keepalive_ping_not_acknowledged_closes_connection \ + test_keepalive_ping_with_no_ping_timeout \ + ; do + sed -i "s/def $t(/def skip_$t(/" tests/legacy/test_protocol.py + done + '' + + lib.optionalString (pythonOlder "3.11") '' + # Our Python 3.10 and older raise SSLError instead of SSLCertVerificationError + sed -i "s/def test_reject_invalid_server_certificate(/def skip_test_reject_invalid_server_certificate(/" tests/sync/test_client.py + ''; nativeCheckInputs = [ unittestCheckHook ];