Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / unittest-xml-reporting / default.nix
blob36768b0fccb777d4e355e615a8de4de173538e94
1 { lib
2 , fetchFromGitHub
3 , buildPythonPackage
4 , lxml
5 , pythonAtLeast
6 , pythonOlder
7 , pytestCheckHook
8 }:
10 buildPythonPackage rec {
11   pname = "unittest-xml-reporting";
12   version = "3.2.0";
13   format = "setuptools";
14   disabled = pythonOlder "3.7";
16   src = fetchFromGitHub {
17     owner = "xmlrunner";
18     repo = "unittest-xml-reporting";
19     rev = version;
20     hash = "sha256-lOJ/+8CVJUXdIaZLLF5PpPkG0DzlNgo46kRZ1Xy7Ju0=";
21   };
23   propagatedBuildInputs = [
24     lxml
25   ];
27   nativeCheckInputs = [
28     pytestCheckHook
29   ];
31   pytestFlagsArray = lib.optionals (pythonAtLeast "3.11") [
32     # AttributeError: 'tuple' object has no attribute 'shortDescription'
33     "--deselect=tests/testsuite.py::XMLTestRunnerTestCase::test_basic_unittest_constructs"
34     "--deselect=tests/testsuite.py::XMLTestRunnerTestCase::test_unexpected_success"
35   ];
37   pythonImportsCheck = [ "xmlrunner" ];
39   meta = with lib; {
40     homepage = "https://github.com/xmlrunner/unittest-xml-reporting";
41     description = "unittest-based test runner with Ant/JUnit like XML reporting";
42     license = licenses.bsd2;
43     maintainers = with maintainers; [ rprospero ];
44   };