python3Packages.websockets: make tests deterministic

(cherry picked from commit b5fcd79c3f)
This commit is contained in:
Gabriel Ebner
2020-09-12 19:20:11 +02:00
parent 183b44daa3
commit 4d730eebf3

View File

@@ -22,6 +22,13 @@ buildPythonPackage rec {
# Tests fail on Darwin with `OSError: AF_UNIX path too long`
doCheck = !stdenv.isDarwin;
# Disable all tests that need to terminate within a predetermined amount of
# time. This is nondeterministic.
patchPhase = ''
sed -i 's/with self.assertCompletesWithin.*:/if True:/' \
tests/test_protocol.py
'';
meta = with lib; {
description = "WebSocket implementation in Python 3";
homepage = "https://github.com/aaugustin/websockets";