about summary refs log tree commit diff
path: root/pkgs/development/python-modules/unittest-xml-reporting/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/unittest-xml-reporting/default.nix')
-rw-r--r--pkgs/development/python-modules/unittest-xml-reporting/default.nix46
1 files changed, 25 insertions, 21 deletions
diff --git a/pkgs/development/python-modules/unittest-xml-reporting/default.nix b/pkgs/development/python-modules/unittest-xml-reporting/default.nix
index 36768b0fccb77..030ab4337ec70 100644
--- a/pkgs/development/python-modules/unittest-xml-reporting/default.nix
+++ b/pkgs/development/python-modules/unittest-xml-reporting/default.nix
@@ -1,44 +1,48 @@
-{ lib
-, fetchFromGitHub
-, buildPythonPackage
-, lxml
-, pythonAtLeast
-, pythonOlder
-, pytestCheckHook
+{
+  lib,
+  buildPythonPackage,
+  fetchFromGitHub,
+  lxml,
+  pytestCheckHook,
+  pythonAtLeast,
+  pythonOlder,
+  setuptools,
 }:
 
 buildPythonPackage rec {
   pname = "unittest-xml-reporting";
   version = "3.2.0";
-  format = "setuptools";
+  pyproject = true;
+
   disabled = pythonOlder "3.7";
 
   src = fetchFromGitHub {
     owner = "xmlrunner";
     repo = "unittest-xml-reporting";
-    rev = version;
+    rev = "refs/tags/${version}";
     hash = "sha256-lOJ/+8CVJUXdIaZLLF5PpPkG0DzlNgo46kRZ1Xy7Ju0=";
   };
 
-  propagatedBuildInputs = [
-    lxml
-  ];
+  build-system = [ setuptools ];
+
+  dependencies = [ lxml ];
 
-  nativeCheckInputs = [
-    pytestCheckHook
-  ];
+  nativeCheckInputs = [ pytestCheckHook ];
 
-  pytestFlagsArray = lib.optionals (pythonAtLeast "3.11") [
-    # AttributeError: 'tuple' object has no attribute 'shortDescription'
-    "--deselect=tests/testsuite.py::XMLTestRunnerTestCase::test_basic_unittest_constructs"
-    "--deselect=tests/testsuite.py::XMLTestRunnerTestCase::test_unexpected_success"
-  ];
+  disabledTests =
+    lib.optionals (pythonAtLeast "3.11") [
+      # AttributeError: 'tuple' object has no attribute 'shortDescription'
+      "test_basic_unittest_constructs"
+      "test_unexpected_success"
+    ]
+    ++ lib.optionals (pythonAtLeast "3.12") [ "test_xmlrunner_hold_traceback" ];
 
   pythonImportsCheck = [ "xmlrunner" ];
 
   meta = with lib; {
+    description = "Unittest-based test runner with Ant/JUnit like XML reporting";
     homepage = "https://github.com/xmlrunner/unittest-xml-reporting";
-    description = "unittest-based test runner with Ant/JUnit like XML reporting";
+    changelog = "https://github.com/xmlrunner/unittest-xml-reporting/releases/tag/${version}";
     license = licenses.bsd2;
     maintainers = with maintainers; [ rprospero ];
   };