zulip-term: fix tests

This commit is contained in:
Robert Schütz 2022-07-12 14:25:06 +00:00 committed by Robert Schütz
parent 8c036c75ca
commit 27939f0d7c
2 changed files with 26 additions and 6 deletions

View File

@ -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";

View File

@ -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