1{ lib
2, buildPythonPackage
3, fetchPypi
4, mock
5, pytestCheckHook
6, pythonOlder
7, setuptools
8}:
9
10buildPythonPackage rec {
11 pname = "parameterized";
12 version = "0.9.0";
13 format = "pyproject";
14
15 disabled = pythonOlder "3.7";
16
17 src = fetchPypi {
18 inherit pname version;
19 hash = "sha256-f8kFJyzvpPNkwaNCnLvpwPmLeTmI77W/kKrIDwjbCbE=";
20 };
21
22 postPatch = ''
23 # broken with pytest 7
24 # https://github.com/wolever/parameterized/issues/167
25 substituteInPlace parameterized/test.py \
26 --replace 'assert_equal(missing, [])' ""
27 '';
28
29 nativeBuildInputs = [
30 setuptools
31 ];
32
33 checkInputs = [
34 mock
35 pytestCheckHook
36 ];
37
38 pytestFlagsArray = [
39 "parameterized/test.py"
40 ];
41
42 pythonImportsCheck = [
43 "parameterized"
44 ];
45
46 meta = with lib; {
47 description = "Parameterized testing with any Python test framework";
48 homepage = "https://github.com/wolever/parameterized";
49 changelog = "https://github.com/wolever/parameterized/blob/v${version}/CHANGELOG.txt";
50 license = licenses.bsd2;
51 maintainers = with maintainers; [ ];
52 };
53}