diff options
author | Sandro Jäckel <sandro.jaeckel@gmail.com> | 2021-09-11 12:16:21 +0200 |
---|---|---|
committer | Sandro Jäckel <sandro.jaeckel@gmail.com> | 2021-09-11 19:02:31 +0200 |
commit | 5836d578ded885255162f2f8e798741d4260f6ec (patch) | |
tree | 1e29341dae1f1fc570f54e6f71da70d980bb7132 /pkgs/development/python-modules/oslotest | |
parent | ac15248e5b68b1a9bcd487331939d55afa3ac902 (diff) |
python39Packages.oslotest: init at 4.5.0
Diffstat (limited to 'pkgs/development/python-modules/oslotest')
-rw-r--r-- | pkgs/development/python-modules/oslotest/default.nix | 41 | ||||
-rw-r--r-- | pkgs/development/python-modules/oslotest/tests.nix | 32 |
2 files changed, 73 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/oslotest/default.nix b/pkgs/development/python-modules/oslotest/default.nix new file mode 100644 index 0000000000000..66e06c8b3e729 --- /dev/null +++ b/pkgs/development/python-modules/oslotest/default.nix @@ -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; + }; +} diff --git a/pkgs/development/python-modules/oslotest/tests.nix b/pkgs/development/python-modules/oslotest/tests.nix new file mode 100644 index 0000000000000..3c07a35c17d84 --- /dev/null +++ b/pkgs/development/python-modules/oslotest/tests.nix @@ -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 + ''; +} |