2021-01-25 08:26:54 +00:00
|
|
|
{ lib
|
2019-07-14 22:31:28 +01:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, pytest
|
|
|
|
, matplotlib
|
|
|
|
, nose
|
2019-12-22 20:01:23 +00:00
|
|
|
, pillow
|
2020-12-07 07:55:09 +00:00
|
|
|
, pytestCheckHook
|
2019-07-14 22:31:28 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pytest-mpl";
|
2020-11-29 14:04:39 +00:00
|
|
|
version = "0.12";
|
2019-07-14 22:31:28 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-11-29 14:04:39 +00:00
|
|
|
sha256 = "4a223909e5148c99bd18891848c7871457729322c752c9c470bd8dd6bdf9f940";
|
2019-07-14 22:31:28 +01:00
|
|
|
};
|
|
|
|
|
2020-12-07 07:55:09 +00:00
|
|
|
buildInputs = [
|
|
|
|
pytest
|
|
|
|
];
|
2019-08-08 00:54:19 +01:00
|
|
|
|
2019-07-14 22:31:28 +01:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
matplotlib
|
|
|
|
nose
|
2019-12-22 20:01:23 +00:00
|
|
|
pillow
|
2019-07-14 22:31:28 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
2020-12-07 07:55:09 +00:00
|
|
|
pytestCheckHook
|
2019-07-14 22:31:28 +01:00
|
|
|
];
|
|
|
|
|
2020-12-07 07:55:09 +00:00
|
|
|
# Broken since b6e98f18950c2b5dbdc725c1181df2ad1be19fee
|
|
|
|
disabledTests = [
|
|
|
|
"test_hash_fails"
|
|
|
|
"test_hash_missing"
|
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
2019-07-16 13:00:08 +01:00
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
mkdir -p $HOME/.config/matplotlib
|
|
|
|
echo "backend: ps" > $HOME/.config/matplotlib/matplotlibrc
|
2019-09-07 12:53:22 +01:00
|
|
|
ln -s $HOME/.config/matplotlib $HOME/.matplotlib
|
2019-07-14 22:31:28 +01:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-07-16 13:00:08 +01:00
|
|
|
description = "Pytest plugin to help with testing figures output from Matplotlib";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/matplotlib/pytest-mpl";
|
2019-07-14 22:31:28 +01:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = [ maintainers.costrouc ];
|
|
|
|
};
|
|
|
|
}
|