about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFabian Affolter <mail@fabian-affolter.ch>2023-01-27 10:55:15 +0100
committerFabian Affolter <mail@fabian-affolter.ch>2023-01-27 10:55:15 +0100
commit0c1c251568c480da37c3066aa03fd422fc52fe4b (patch)
tree02133f2d514a9e8f78b207dffc9dfa9b766f40a7
parentae66f57ac4e31ddaec58f5aafe8cd2194cfd67e3 (diff)
python310Packages.aenum: switch to pytestCheckHook
- disable failing tests
-rw-r--r--pkgs/development/python-modules/aenum/default.nix29
1 files changed, 17 insertions, 12 deletions
diff --git a/pkgs/development/python-modules/aenum/default.nix b/pkgs/development/python-modules/aenum/default.nix
index 04610db42ece4..bc3bdc2fd5830 100644
--- a/pkgs/development/python-modules/aenum/default.nix
+++ b/pkgs/development/python-modules/aenum/default.nix
@@ -1,9 +1,9 @@
 { lib
 , buildPythonPackage
 , fetchPypi
-, isPy3k
 , pyparsing
-, python
+, pytestCheckHook
+, pythonOlder
 }:
 
 buildPythonPackage rec {
@@ -11,28 +11,33 @@ buildPythonPackage rec {
   version = "3.1.11";
   format = "setuptools";
 
+  disabled = pythonOlder "3.7";
+
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-rtLCc1R65yoNXuhpcZwCpkPaFr9QfICVj6rcfgOOP3M=";
+    hash = "sha256-rtLCc1R65yoNXuhpcZwCpkPaFr9QfICVj6rcfgOOP3M=";
   };
 
   nativeCheckInputs = [
     pyparsing
+    pytestCheckHook
   ];
 
-  # py2 likes to reorder tests
-  doCheck = isPy3k;
-
-  checkPhase = ''
-    runHook preCheck
-    ${python.interpreter} aenum/test.py
-    runHook postCheck
-  '';
-
   pythonImportsCheck = [
     "aenum"
   ];
 
+  disabledTests = [
+    # https://github.com/ethanfurman/aenum/issues/27
+    "test_class_nested_enum_and_pickle_protocol_four"
+    "test_pickle_enum_function_with_qualname"
+    "test_stdlib_inheritence"
+    "test_subclasses_with_getnewargs_ex"
+    "test_arduino_headers"
+    "test_c_header_scanner"
+    "test_extend_flag_backwards_stdlib"
+  ];
+
   meta = with lib; {
     description = "Advanced Enumerations (compatible with Python's stdlib Enum), NamedTuples, and NamedConstants";
     homepage = "https://github.com/ethanfurman/aenum";