python39Packages.oslotest: init at 4.5.0

This commit is contained in:
Sandro Jäckel 2021-09-11 12:16:21 +02:00
parent ac15248e5b
commit 5836d578de
No known key found for this signature in database
GPG key ID: 3AF5A43A3EECC2E5
3 changed files with 75 additions and 0 deletions

View 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;
};
}

View 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
'';
}

View file

@ -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 { };