1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
{
lib,
buildPythonPackage,
fetchPypi,
pythonAtLeast,
pythonOlder,
matplotlib,
numpy,
pandas,
pillow,
pytest,
pytest-datadir,
pytestCheckHook,
pyyaml,
setuptools-scm,
}:
buildPythonPackage rec {
pname = "pytest-regressions";
version = "2.5.0";
format = "setuptools";
disabled = pythonOlder "3.6";
src = fetchPypi {
inherit pname version;
hash = "sha256-gYx4hMHP87q/ie67AsvCezB4VrGYVCfCTVLLgSoQb9k=";
};
nativeBuildInputs = [ setuptools-scm ];
buildInputs = [ pytest ];
propagatedBuildInputs = [
pytest-datadir
pyyaml
];
nativeCheckInputs = [
matplotlib
pandas
pytestCheckHook
];
pytestFlagsArray = [
"-W"
"ignore::DeprecationWarning"
];
disabledTestPathss = lib.optionals (pythonAtLeast "3.12") [
# AttributeError: partially initialized module 'pandas' has no attribute '_pandas_datetime_CAPI' (most likely due to a circular import)
"tests/test_num_regression.py"
];
pythonImportsCheck = [
"pytest_regressions"
"pytest_regressions.plugin"
];
passthru.optional-dependencies = {
dataframe = [
pandas
numpy
];
image = [
numpy
pillow
];
num = [
numpy
pandas
];
};
meta = with lib; {
description = "Pytest fixtures to write regression tests";
longDescription = ''
pytest-regressions makes it simple to test general data, images,
files, and numeric tables by saving expected data in a data
directory (courtesy of pytest-datadir) that can be used to verify
that future runs produce the same data.
'';
homepage = "https://github.com/ESSS/pytest-regressions";
license = licenses.mit;
maintainers = with maintainers; [ AluisioASG ];
};
}
|