Skip to content

Commit

Permalink
python3Packages.websockets: make tests deterministic
Browse files Browse the repository at this point in the history
  • Loading branch information
gebner committed Sep 12, 2020
1 parent 9866abf commit b5fcd79
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkgs/development/python-modules/websockets/default.nix
Expand Up @@ -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";
Expand Down

5 comments on commit b5fcd79

@risicle
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit seems somehow to have broken pythonPackages.httpx.

@risicle
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually maybe it hasn't - perhaps it just caused a rebuild that exposed some latent breakage. Very odd.

@gebner
Copy link
Member Author

@gebner gebner commented on b5fcd79 Sep 13, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@risicle I think this is an upstream bug: encode/httpx#1270

@gebner
Copy link
Member Author

@gebner gebner commented on b5fcd79 Sep 13, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently the test starts failing after September 8th 2020 😮

@risicle
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, just realized that after about 5 minutes of head-scratching

Please sign in to comment.