khal: disable failing tests and cleanup test logic

Closes #128751
This commit is contained in:
Sumner Evans 2021-07-02 00:34:26 -06:00
parent f4ccef0999
commit fe28c6aed6
No known key found for this signature in database
GPG key ID: 8904527AB50022FD
2 changed files with 11 additions and 50 deletions

View file

@ -9,10 +9,6 @@ with python3.pkgs; buildPythonApplication rec {
sha256 = "sha256-L92PwU/ll+Wn1unGPHho2WC07QIbVjxoSnHwcJDtpDI=";
};
patches = [
./skip-broken-test.patch
];
propagatedBuildInputs = [
atomicwrites
click
@ -31,16 +27,12 @@ with python3.pkgs; buildPythonApplication rec {
freezegun
];
nativeBuildInputs = [ setuptools-scm sphinx sphinxcontrib_newsfeed ];
checkInputs = [ pytest glibcLocales ];
checkInputs = [
glibcLocales
pytestCheckHook
];
LC_ALL = "en_US.UTF-8";
postPatch = ''
sed -i \
-e "s/Invalid value for \"ics\"/Invalid value for \\\'ics\\\'/" \
-e "s/Invalid value for \"\[ICS\]\"/Invalid value for \\\'\[ICS\]\\\'/" \
tests/cli_test.py
'';
postInstall = ''
# zsh completion
install -D misc/__khal $out/share/zsh/site-functions/__khal
@ -56,11 +48,13 @@ with python3.pkgs; buildPythonApplication rec {
doCheck = !stdenv.isAarch64;
checkPhase = ''
py.test -k "not test_vertical_month_abbr_fr and not test_vertical_month_unicode_weekdeays_gr \
and not test_event_different_timezones and not test_default_calendar and not test_birthdays \
and not test_birthdays_no_year"
'';
disabledTests = [
# This test is failing due to https://github.com/pimutils/khal/issues/1065
"test_print_ics_command"
# Mocking breaks in this testcase
"test_import_from_stdin"
];
meta = with lib; {
homepage = "http://lostpackets.de/khal/";

View file

@ -1,33 +0,0 @@
diff --git a/tests/cli_test.py b/tests/cli_test.py
index 5e354a5..d8fbcd5 100644
--- a/tests/cli_test.py
+++ b/tests/cli_test.py
@@ -493,6 +493,7 @@ def test_import_invalid_choice_and_prefix(runner):
assert result.output == '09.04.-09.04. An Event\n'
+@pytest.mark.skip(reason="Mocking breaks in this testcase")
def test_import_from_stdin(runner, monkeypatch):
ics_data = 'This is some really fake icalendar data'
diff --git a/tests/ui/test_editor.py b/tests/ui/test_editor.py
index 27b7fa5..5978d72 100644
--- a/tests/ui/test_editor.py
+++ b/tests/ui/test_editor.py
@@ -1,5 +1,7 @@
import datetime as dt
+import pytest
+
import icalendar
from khal.ui.editor import RecurrenceEditor, StartEndEditor
@@ -19,7 +21,7 @@ palette = {
'edit': 'blue',
}
-
+@pytest.mark.skip(reason="Mocking breaks in this testcase")
def test_popup(monkeypatch):
"""making sure the popup calendar gets callend with the right inital value