diff options
author | Robert Schütz <nix@dotlambda.de> | 2022-07-12 14:25:06 +0000 |
---|---|---|
committer | Robert Schütz <github@dotlambda.de> | 2022-08-11 08:31:56 +0000 |
commit | 27939f0d7ce21e23e9d71fe90c860644def52ad7 (patch) | |
tree | 1cae2a1a40b76d0390e9a4e64bfd045c66db5ea3 /pkgs | |
parent | 8c036c75cabc42d7f13e93394a6d8f5760995f6a (diff) |
zulip-term: fix tests
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/applications/networking/instant-messengers/zulip-term/default.nix | 10 | ||||
-rw-r--r-- | pkgs/applications/networking/instant-messengers/zulip-term/pytest-executable-name.patch | 22 |
2 files changed, 26 insertions, 6 deletions
diff --git a/pkgs/applications/networking/instant-messengers/zulip-term/default.nix b/pkgs/applications/networking/instant-messengers/zulip-term/default.nix index ad16c84c69894..cf48ba4420e65 100644 --- a/pkgs/applications/networking/instant-messengers/zulip-term/default.nix +++ b/pkgs/applications/networking/instant-messengers/zulip-term/default.nix @@ -17,6 +17,10 @@ python3.pkgs.buildPythonApplication rec { sha256 = "sha256-ZouUU4p1FSGMxPuzDo5P971R+rDXpBdJn2MqvkJO+Fw="; }; + patches = [ + ./pytest-executable-name.patch + ]; + propagatedBuildInputs = with python3.pkgs; [ beautifulsoup4 lxml @@ -43,12 +47,6 @@ python3.pkgs.buildPythonApplication rec { "--prefix" "PATH" ":" (lib.makeBinPath [ libnotify ]) ]; - disabledTests = [ - # IndexError: list index out of range - "test_main_multiple_notify_options" - "test_main_multiple_autohide_options" - ]; - meta = with lib; { description = "Zulip's official terminal client"; homepage = "https://github.com/zulip/zulip-terminal"; diff --git a/pkgs/applications/networking/instant-messengers/zulip-term/pytest-executable-name.patch b/pkgs/applications/networking/instant-messengers/zulip-term/pytest-executable-name.patch new file mode 100644 index 0000000000000..a816993b8c4b5 --- /dev/null +++ b/pkgs/applications/networking/instant-messengers/zulip-term/pytest-executable-name.patch @@ -0,0 +1,22 @@ +diff --git a/tests/cli/test_run.py b/tests/cli/test_run.py +index 1452cfd..0a21c09 100644 +--- a/tests/cli/test_run.py ++++ b/tests/cli/test_run.py +@@ -240,7 +240,7 @@ def test_main_multiple_autohide_options( + + captured = capsys.readouterr() + lines = captured.err.strip("\n") +- lines = lines.split("pytest: ", 1)[1] ++ lines = lines.split("__main__.py: ", 1)[1] + expected = f"error: argument {options[1]}: not allowed with argument {options[0]}" + assert lines == expected + +@@ -277,7 +277,7 @@ def test_main_multiple_notify_options( + + captured = capsys.readouterr() + lines = captured.err.strip("\n") +- lines = lines.split("pytest: ", 1)[1] ++ lines = lines.split("__main__.py: ", 1)[1] + expected = f"error: argument {options[1]}: not allowed with argument {options[0]}" + assert lines == expected + |