1{ lib
2, fetchFromGitHub
3, buildPythonPackage
4, lxml
5, pythonAtLeast
6, pythonOlder
7, pytestCheckHook
8}:
9
10buildPythonPackage rec {
11 pname = "unittest-xml-reporting";
12 version = "3.2.0";
13 disabled = pythonOlder "3.7";
14
15 src = fetchFromGitHub {
16 owner = "xmlrunner";
17 repo = "unittest-xml-reporting";
18 rev = version;
19 hash = "sha256-lOJ/+8CVJUXdIaZLLF5PpPkG0DzlNgo46kRZ1Xy7Ju0=";
20 };
21
22 propagatedBuildInputs = [
23 lxml
24 ];
25
26 nativeCheckInputs = [
27 pytestCheckHook
28 ];
29
30 pytestFlagsArray = lib.optionals (pythonAtLeast "3.11") [
31 # AttributeError: 'tuple' object has no attribute 'shortDescription'
32 "--deselect=tests/testsuite.py::XMLTestRunnerTestCase::test_basic_unittest_constructs"
33 "--deselect=tests/testsuite.py::XMLTestRunnerTestCase::test_unexpected_success"
34 ];
35
36 pythonImportsCheck = [ "xmlrunner" ];
37
38 meta = with lib; {
39 homepage = "https://github.com/xmlrunner/unittest-xml-reporting";
40 description = "unittest-based test runner with Ant/JUnit like XML reporting";
41 license = licenses.bsd2;
42 maintainers = with maintainers; [ rprospero SuperSandro2000 ];
43 };
44}