2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2022-04-27 09:35:20 +00:00
|
|
|
, setuptools-scm
|
2020-04-24 23:36:52 +00:00
|
|
|
, pytest
|
2022-04-27 09:35:20 +00:00
|
|
|
, jinja2
|
2020-04-24 23:36:52 +00:00
|
|
|
, matplotlib
|
|
|
|
, nose
|
|
|
|
, pillow
|
2020-12-09 12:39:15 +00:00
|
|
|
, pytestCheckHook
|
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";
|
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
|
|
|
};
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools-scm
|
|
|
|
];
|
|
|
|
|
2020-12-09 12:39:15 +00:00
|
|
|
buildInputs = [
|
|
|
|
pytest
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
SETUPTOOLS_SCM_PRETEND_VERSION=version;
|
|
|
|
|
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
|
|
|
|
nose
|
|
|
|
pillow
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2020-12-09 12:39:15 +00:00
|
|
|
pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
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;
|
|
|
|
maintainers = [ maintainers.costrouc ];
|
|
|
|
};
|
|
|
|
}
|