mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 07:13:23 +01:00
python39Packages.oslotest: init at 4.5.0
This commit is contained in:
parent
ac15248e5b
commit
5836d578de
3 changed files with 75 additions and 0 deletions
41
pkgs/development/python-modules/oslotest/default.nix
Normal file
41
pkgs/development/python-modules/oslotest/default.nix
Normal file
|
@ -0,0 +1,41 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, fixtures
|
||||
, pbr
|
||||
, subunit
|
||||
, callPackage
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "oslotest";
|
||||
version = "4.5.0";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "360ad2c41ba3ad6f059c7c6e7291450d082c2e5dbb0012e839a829978053dfe6";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pbr ];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
fixtures
|
||||
subunit
|
||||
];
|
||||
|
||||
# check in passthru.tests.pytest to escape infinite recursion with other oslo components
|
||||
doCheck = false;
|
||||
|
||||
passthru.tests = {
|
||||
pytest = callPackage ./tests.nix {};
|
||||
};
|
||||
|
||||
pythonImportsCheck = [ "oslotest" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Oslo test framework";
|
||||
homepage = "https://github.com/openstack/oslotest";
|
||||
license = licenses.asl20;
|
||||
maintainers = teams.openstack.members;
|
||||
};
|
||||
}
|
32
pkgs/development/python-modules/oslotest/tests.nix
Normal file
32
pkgs/development/python-modules/oslotest/tests.nix
Normal file
|
@ -0,0 +1,32 @@
|
|||
{ stdenv
|
||||
, buildPythonPackage
|
||||
, oslo-config
|
||||
, oslotest
|
||||
, stestr
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "oslotest-tests";
|
||||
inherit (oslotest) version;
|
||||
|
||||
src = oslotest.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 = [
|
||||
oslotest
|
||||
oslo-config
|
||||
stestr
|
||||
];
|
||||
|
||||
checkPhase = ''
|
||||
stestr run
|
||||
'';
|
||||
}
|
|
@ -5170,6 +5170,8 @@ in {
|
|||
|
||||
oslo-utils = callPackage ../development/python-modules/oslo-utils { };
|
||||
|
||||
oslotest = callPackage ../development/python-modules/oslotest { };
|
||||
|
||||
osqp = callPackage ../development/python-modules/osqp { };
|
||||
|
||||
outcome = callPackage ../development/python-modules/outcome { };
|
||||
|
|
Loading…
Reference in a new issue