summary refs log tree commit diff
path: root/pkgs/applications/misc/khal
diff options
context:
space:
mode:
authorSumner Evans <me@sumnerevans.com>2021-07-02 00:34:26 -0600
committerSumner Evans <me@sumnerevans.com>2021-07-02 00:34:38 -0600
commitfe28c6aed6b9108c656c16fcb85e2e63ecfb4010 (patch)
tree3942c01df4ce009eb6fbd199457d769eb8ff9e2c /pkgs/applications/misc/khal
parentf4ccef09990431b2793800e2ecc09a43ba3c0997 (diff)
downloadnixpkgs-fe28c6aed6b9108c656c16fcb85e2e63ecfb4010.tar
nixpkgs-fe28c6aed6b9108c656c16fcb85e2e63ecfb4010.tar.gz
nixpkgs-fe28c6aed6b9108c656c16fcb85e2e63ecfb4010.tar.bz2
nixpkgs-fe28c6aed6b9108c656c16fcb85e2e63ecfb4010.tar.lz
nixpkgs-fe28c6aed6b9108c656c16fcb85e2e63ecfb4010.tar.xz
nixpkgs-fe28c6aed6b9108c656c16fcb85e2e63ecfb4010.tar.zst
nixpkgs-fe28c6aed6b9108c656c16fcb85e2e63ecfb4010.zip
khal: disable failing tests and cleanup test logic
Closes #128751
Diffstat (limited to 'pkgs/applications/misc/khal')
-rw-r--r--pkgs/applications/misc/khal/default.nix28
-rw-r--r--pkgs/applications/misc/khal/skip-broken-test.patch33
2 files changed, 11 insertions, 50 deletions
diff --git a/pkgs/applications/misc/khal/default.nix b/pkgs/applications/misc/khal/default.nix
index 5c6b505dd68..ab333c4f798 100644
--- a/pkgs/applications/misc/khal/default.nix
+++ b/pkgs/applications/misc/khal/default.nix
@@ -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/";
diff --git a/pkgs/applications/misc/khal/skip-broken-test.patch b/pkgs/applications/misc/khal/skip-broken-test.patch
deleted file mode 100644
index fc37f6acc86..00000000000
--- a/pkgs/applications/misc/khal/skip-broken-test.patch
+++ /dev/null
@@ -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
-