2021-01-25 08:26:54 +00:00
|
|
|
{ lib
|
2019-07-14 21:31:28 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2022-04-19 11:56:32 +00:00
|
|
|
, setuptools-scm
|
2019-07-14 21:31:28 +00:00
|
|
|
, pytest
|
2022-04-19 11:56:32 +00:00
|
|
|
, jinja2
|
2019-07-14 21:31:28 +00:00
|
|
|
, matplotlib
|
|
|
|
, nose
|
2019-12-22 20:01:23 +00:00
|
|
|
, pillow
|
2020-12-07 07:55:09 +00:00
|
|
|
, pytestCheckHook
|
2019-07-14 21:31:28 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pytest-mpl";
|
2022-04-22 14:46:09 +00:00
|
|
|
version = "0.15.0";
|
2019-07-14 21:31:28 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-04-22 14:46:09 +00:00
|
|
|
sha256 = "sha256-p5/UKLVoDYclp2o/MBb2oX1pHzxsQpHjmfwU1kFSKbw=";
|
2019-07-14 21:31:28 +00:00
|
|
|
};
|
|
|
|
|
2022-04-19 11:56:32 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools-scm
|
|
|
|
];
|
|
|
|
|
2020-12-07 07:55:09 +00:00
|
|
|
buildInputs = [
|
|
|
|
pytest
|
|
|
|
];
|
2019-08-07 23:54:19 +00:00
|
|
|
|
2022-04-19 11:56:32 +00:00
|
|
|
SETUPTOOLS_SCM_PRETEND_VERSION=version;
|
|
|
|
|
2019-07-14 21:31:28 +00:00
|
|
|
propagatedBuildInputs = [
|
2022-04-19 11:56:32 +00:00
|
|
|
jinja2
|
2019-07-14 21:31:28 +00:00
|
|
|
matplotlib
|
|
|
|
nose
|
2019-12-22 20:01:23 +00:00
|
|
|
pillow
|
2019-07-14 21:31:28 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
2020-12-07 07:55:09 +00:00
|
|
|
pytestCheckHook
|
2019-07-14 21:31:28 +00:00
|
|
|
];
|
|
|
|
|
2022-04-19 11:56:32 +00:00
|
|
|
|
2020-12-07 07:55:09 +00:00
|
|
|
disabledTests = [
|
2022-04-19 11:56:32 +00:00
|
|
|
# Broken since b6e98f18950c2b5dbdc725c1181df2ad1be19fee
|
2020-12-07 07:55:09 +00:00
|
|
|
"test_hash_fails"
|
|
|
|
"test_hash_missing"
|
|
|
|
];
|
|
|
|
|
2022-04-19 11:56:32 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
# Following are broken since at least a1548780dbc79d76360580691dc1bb4af4e837f6
|
|
|
|
"tests/subtests/test_subtest.py"
|
|
|
|
];
|
|
|
|
|
2020-12-07 07:55:09 +00:00
|
|
|
preCheck = ''
|
2019-07-16 12:00:08 +00:00
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
mkdir -p $HOME/.config/matplotlib
|
|
|
|
echo "backend: ps" > $HOME/.config/matplotlib/matplotlibrc
|
2019-09-07 11:53:22 +00:00
|
|
|
ln -s $HOME/.config/matplotlib $HOME/.matplotlib
|
2019-07-14 21:31:28 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-07-16 12:00:08 +00:00
|
|
|
description = "Pytest plugin to help with testing figures output from Matplotlib";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/matplotlib/pytest-mpl";
|
2019-07-14 21:31:28 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = [ maintainers.costrouc ];
|
|
|
|
};
|
|
|
|
}
|