summary refs log tree commit diff
diff options
context:
space:
mode:
authorFabian Affolter <mail@fabian-affolter.ch>2022-01-11 13:55:12 +0100
committerFabian Affolter <mail@fabian-affolter.ch>2022-01-11 13:55:12 +0100
commit6f10ae26f29c63aa05fbf3a46e8d99cff579b37f (patch)
tree1324c5af0a87e723d9a46205b37bad6f838d624a
parentd36d401087a7e347c8b8ec539af1d32e130de564 (diff)
downloadnixpkgs-6f10ae26f29c63aa05fbf3a46e8d99cff579b37f.tar
nixpkgs-6f10ae26f29c63aa05fbf3a46e8d99cff579b37f.tar.gz
nixpkgs-6f10ae26f29c63aa05fbf3a46e8d99cff579b37f.tar.bz2
nixpkgs-6f10ae26f29c63aa05fbf3a46e8d99cff579b37f.tar.lz
nixpkgs-6f10ae26f29c63aa05fbf3a46e8d99cff579b37f.tar.xz
nixpkgs-6f10ae26f29c63aa05fbf3a46e8d99cff579b37f.tar.zst
nixpkgs-6f10ae26f29c63aa05fbf3a46e8d99cff579b37f.zip
python3Packages.loguru: disable failing tests
-rw-r--r--pkgs/development/python-modules/loguru/default.nix44
1 files changed, 35 insertions, 9 deletions
diff --git a/pkgs/development/python-modules/loguru/default.nix b/pkgs/development/python-modules/loguru/default.nix
index 3134d956af7..3c5bff1382b 100644
--- a/pkgs/development/python-modules/loguru/default.nix
+++ b/pkgs/development/python-modules/loguru/default.nix
@@ -1,42 +1,68 @@
 { lib
 , stdenv
+, aiocontextvars
 , buildPythonPackage
-, fetchPypi
-, fetchpatch
-, isPy27
 , colorama
+, fetchpatch
+, fetchPypi
 , pytestCheckHook
+, pythonOlder
 }:
 
 buildPythonPackage rec {
   pname = "loguru";
   version = "0.5.3";
+  format = "setuptools";
 
-  disabled = isPy27;
+  disabled = pythonOlder "3.5";
 
   src = fetchPypi {
     inherit pname version;
     sha256 = "b28e72ac7a98be3d28ad28570299a393dfcd32e5e3f6a353dec94675767b6319";
   };
 
+  propagatedBuildInputs = lib.optionals (pythonOlder "3.7") [
+    aiocontextvars
+  ];
+
+  checkInputs = [
+    pytestCheckHook
+    colorama
+  ];
+
   patches = [
     # Fixes tests with pytest>=6.2.2. Will be part of the next release after 0.5.3
     (fetchpatch {
       url = "https://github.com/Delgan/loguru/commit/31cf758ee9d22dbfa125f38153782fe20ac9dce5.patch";
       sha256 = "1lzbs8akg1s7s6xjl3samf4c4bpssqvwg5fn3mwlm4ysr7jd5y67";
     })
-    # fix tests with Python 3.9
+    # Fix tests with Python 3.9
     (fetchpatch {
       url = "https://github.com/Delgan/loguru/commit/19f518c5f1f355703ffc4ee62f0e1e397605863e.patch";
       sha256 = "0yn6smik58wdffr4svqsy2n212fwdlcfcwpgqhl9hq2zlivmsdc6";
     })
   ];
 
-  checkInputs = [ pytestCheckHook colorama ];
+  disabledTestPaths = lib.optionals stdenv.isDarwin [
+    "tests/test_multiprocessing.py"
+  ];
+
+  disabledTests = [
+    "test_time_rotation_reopening"
+    "test_file_buffering"
+    # Tests are failing with Python 3.10
+    "test_exception_others"
+    ""
+  ] ++ lib.optionals stdenv.isDarwin [
+    "test_rotation_and_retention"
+    "test_rotation_and_retention_timed_file"
+    "test_renaming"
+    "test_await_complete_inheritance"
+  ];
 
-  disabledTestPaths = lib.optionals stdenv.isDarwin [ "tests/test_multiprocessing.py" ];
-  disabledTests = [ "test_time_rotation_reopening" "test_file_buffering" ]
-    ++ lib.optionals stdenv.isDarwin [ "test_rotation_and_retention" "test_rotation_and_retention_timed_file" "test_renaming" "test_await_complete_inheritance" ];
+  pythonImportsCheck = [
+    "loguru"
+  ];
 
   meta = with lib; {
     homepage = "https://github.com/Delgan/loguru";