2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
mock,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
setuptools,
|
2021-03-20 04:20:00 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "parameterized";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "0.9.0";
|
|
|
|
format = "pyproject";
|
2023-02-02 18:25:31 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-07-15 17:15:38 +00:00
|
|
|
hash = "sha256-f8kFJyzvpPNkwaNCnLvpwPmLeTmI77W/kKrIDwjbCbE=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
postPatch = ''
|
2024-01-13 08:15:51 +00:00
|
|
|
# broken with pytest 7 and python 3.12
|
2023-07-15 17:15:38 +00:00
|
|
|
# https://github.com/wolever/parameterized/issues/167
|
2024-01-13 08:15:51 +00:00
|
|
|
# https://github.com/wolever/parameterized/pull/162
|
2023-07-15 17:15:38 +00:00
|
|
|
substituteInPlace parameterized/test.py \
|
2024-01-13 08:15:51 +00:00
|
|
|
--replace 'assert_equal(missing, [])' "" \
|
|
|
|
--replace "assertRaisesRegexp" "assertRaisesRegex"
|
2023-07-15 17:15:38 +00:00
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools ];
|
2023-07-15 17:15:38 +00:00
|
|
|
|
2021-03-20 04:20:00 +00:00
|
|
|
checkInputs = [
|
|
|
|
mock
|
2023-02-02 18:25:31 +00:00
|
|
|
pytestCheckHook
|
2021-03-20 04:20:00 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pytestFlagsArray = [ "parameterized/test.py" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "parameterized" ];
|
2021-03-20 04:20:00 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Parameterized testing with any Python test framework";
|
2021-03-20 04:20:00 +00:00
|
|
|
homepage = "https://github.com/wolever/parameterized";
|
2023-02-02 18:25:31 +00:00
|
|
|
changelog = "https://github.com/wolever/parameterized/blob/v${version}/CHANGELOG.txt";
|
2021-03-20 04:20:00 +00:00
|
|
|
license = licenses.bsd2;
|
2024-07-31 10:19:44 +00:00
|
|
|
maintainers = [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|