depot/third_party/nixpkgs/pkgs/development/python-modules/testscenarios/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

56 lines
929 B
Nix

{
lib,
buildPythonPackage,
fetchPypi,
# build-system
pbr,
setuptools,
# dependencies
testtools,
# tests
python,
}:
buildPythonPackage rec {
pname = "testscenarios";
version = "0.5.0";
pyproject = true;
src = fetchPypi {
inherit pname version;
sha256 = "c257cb6b90ea7e6f8fef3158121d430543412c9a87df30b5dde6ec8b9b57a2b6";
};
postPatch = ''
substituteInPlace setup.cfg \
--replace "buffer = 1" "" \
--replace "catch = 1" ""
'';
nativeBuildInputs = [
pbr
setuptools
];
propagatedBuildInputs = [
pbr
testtools
];
checkPhase = ''
runHook preCheck
${python.interpreter} -m testtools.run testscenarios.tests.test_suite
runHook postCheck
'';
meta = with lib; {
description = "Pyunit extension for dependency injection";
homepage = "https://github.com/testing-cabal/testscenarios";
license = licenses.asl20;
};
}