From b5fcd79c3f97f1fae6f73979db41be719237a7e9 Mon Sep 17 00:00:00 2001 From: Gabriel Ebner Date: Sat, 12 Sep 2020 19:20:11 +0200 Subject: [PATCH] python3Packages.websockets: make tests deterministic --- pkgs/development/python-modules/websockets/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/development/python-modules/websockets/default.nix b/pkgs/development/python-modules/websockets/default.nix index 1e1e1ef58a8e63..eeb12bd5b75b64 100644 --- a/pkgs/development/python-modules/websockets/default.nix +++ b/pkgs/development/python-modules/websockets/default.nix @@ -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";