2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
setuptools-scm,
|
|
|
|
pytest,
|
|
|
|
jinja2,
|
|
|
|
matplotlib,
|
|
|
|
pillow,
|
2024-07-27 06:49:29 +00:00
|
|
|
pytest7CheckHook,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pytest-mpl";
|
2022-08-12 12:06:08 +00:00
|
|
|
version = "0.16.1";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-LVcWgRJOj/X04rnA0EfTfQSZ1rbY8vSaG1DN2ZMQRGk=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools-scm ];
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
buildInputs = [ pytest ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2022-04-27 09:35:20 +00:00
|
|
|
jinja2
|
2020-04-24 23:36:52 +00:00
|
|
|
matplotlib
|
|
|
|
pillow
|
|
|
|
];
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
nativeCheckInputs = [ pytest7CheckHook ];
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2020-12-09 12:39:15 +00:00
|
|
|
disabledTests = [
|
2022-04-27 09:35:20 +00:00
|
|
|
# Broken since b6e98f18950c2b5dbdc725c1181df2ad1be19fee
|
2020-12-09 12:39:15 +00:00
|
|
|
"test_hash_fails"
|
|
|
|
"test_hash_missing"
|
|
|
|
];
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
# Following are broken since at least a1548780dbc79d76360580691dc1bb4af4e837f6
|
|
|
|
"tests/subtests/test_subtest.py"
|
|
|
|
];
|
|
|
|
|
2020-12-09 12:39:15 +00:00
|
|
|
preCheck = ''
|
2020-04-24 23:36:52 +00:00
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
mkdir -p $HOME/.config/matplotlib
|
|
|
|
echo "backend: ps" > $HOME/.config/matplotlib/matplotlibrc
|
|
|
|
ln -s $HOME/.config/matplotlib $HOME/.matplotlib
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Pytest plugin to help with testing figures output from Matplotlib";
|
|
|
|
homepage = "https://github.com/matplotlib/pytest-mpl";
|
|
|
|
license = licenses.bsd3;
|
2023-08-04 22:07:22 +00:00
|
|
|
maintainers = [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|