3
0
Fork 0
forked from mirrors/nixpkgs

python39Packages.stestr: init at 3.2.0

This commit is contained in:
Sandro Jäckel 2021-09-11 12:18:16 +02:00
parent 7b4c9f880f
commit 02a5e64320
No known key found for this signature in database
GPG key ID: 3AF5A43A3EECC2E5
3 changed files with 88 additions and 0 deletions

View file

@ -0,0 +1,54 @@
{ lib
, buildPythonPackage
, fetchPypi
, cliff
, fixtures
, future
, pbr
, subunit
, testtools
, voluptuous
, callPackage
}:
buildPythonPackage rec {
pname = "stestr";
version = "3.2.0";
src = fetchPypi {
inherit pname version;
sha256 = "fb492cbdf3d3fdd6812645804efc84a99a68bb60dd7705f15c1a2949c8172bc4";
};
postPatch = ''
# only a small portion of the listed packages are actually needed for running the tests
# so instead of removing them one by one remove everything
rm test-requirements.txt
'';
propagatedBuildInputs = [
cliff
fixtures
future
pbr
subunit
testtools
voluptuous
];
# check in passthru.tests.pytest to escape infinite recursion with other oslo components
doCheck = false;
passthru.tests = {
pytest = callPackage ./tests.nix { };
};
pythonImportsCheck = [ "stestr" ];
meta = with lib; {
description = "A parallel Python test runner built around subunit";
homepage = "https://github.com/mtreinish/stestr";
license = licenses.asl20;
maintainers = teams.openstack.members;
};
}

View file

@ -0,0 +1,32 @@
{ stdenv
, buildPythonPackage
, ddt
, sqlalchemy
, stestr
, subunit2sql
}:
buildPythonPackage rec {
pname = "stestr-tests";
inherit (stestr) version;
src = stestr.src;
postPatch = ''
# only a small portion of the listed packages are actually needed for running the tests
# so instead of removing them one by one remove everything
rm test-requirements.txt
'';
dontBuild = true;
dontInstall = true;
checkInputs = [
stestr
];
checkPhase = ''
export PATH=$out/bin:$PATH
export HOME=$TMPDIR
'';
}

View file

@ -8553,6 +8553,8 @@ in {
stem = callPackage ../development/python-modules/stem { };
stestr = callPackage ../development/python-modules/stestr { };
stevedore = callPackage ../development/python-modules/stevedore { };
stm32loader = callPackage ../development/python-modules/stm32loader { };