1{ lib
2, buildPythonPackage
3, fetchPypi
4, cliff
5, fixtures
6, future
7, pbr
8, subunit
9, testtools
10, voluptuous
11, callPackage
12}:
13
14buildPythonPackage rec {
15 pname = "stestr";
16 version = "4.0.1";
17
18 src = fetchPypi {
19 inherit pname version;
20 sha256 = "sha256-wsHHO/x8/KORJxWeP7x0GTrr8s0C2KBCfy5YZI42zyY=";
21 };
22
23 postPatch = ''
24 # only a small portion of the listed packages are actually needed for running the tests
25 # so instead of removing them one by one remove everything
26 rm test-requirements.txt
27 '';
28
29 propagatedBuildInputs = [
30 cliff
31 fixtures
32 future
33 pbr
34 subunit
35 testtools
36 voluptuous
37 ];
38
39 # check in passthru.tests.pytest to escape infinite recursion with other oslo components
40 doCheck = false;
41
42 passthru.tests = {
43 tests = callPackage ./tests.nix { };
44 };
45
46 pythonImportsCheck = [ "stestr" ];
47
48 meta = with lib; {
49 description = "A parallel Python test runner built around subunit";
50 homepage = "https://github.com/mtreinish/stestr";
51 license = licenses.asl20;
52 maintainers = teams.openstack.members;
53 };
54}