nixpkgs/pkgs/development/python-modules/pytest-mpl/default.nix

54 lines
1.0 KiB
Nix
Raw Normal View History

{ lib
2019-07-14 22:31:28 +01:00
, buildPythonPackage
, fetchPypi
, pytest
, matplotlib
, nose
, pillow
, pytestCheckHook
2019-07-14 22:31:28 +01:00
}:
buildPythonPackage rec {
pname = "pytest-mpl";
version = "0.12";
2019-07-14 22:31:28 +01:00
src = fetchPypi {
inherit pname version;
sha256 = "4a223909e5148c99bd18891848c7871457729322c752c9c470bd8dd6bdf9f940";
2019-07-14 22:31:28 +01:00
};
buildInputs = [
pytest
];
2019-07-14 22:31:28 +01:00
propagatedBuildInputs = [
matplotlib
nose
pillow
2019-07-14 22:31:28 +01:00
];
checkInputs = [
pytestCheckHook
2019-07-14 22:31:28 +01:00
];
# Broken since b6e98f18950c2b5dbdc725c1181df2ad1be19fee
disabledTests = [
"test_hash_fails"
"test_hash_missing"
];
preCheck = ''
export HOME=$(mktemp -d)
mkdir -p $HOME/.config/matplotlib
echo "backend: ps" > $HOME/.config/matplotlib/matplotlibrc
ln -s $HOME/.config/matplotlib $HOME/.matplotlib
2019-07-14 22:31:28 +01:00
'';
meta = with lib; {
description = "Pytest plugin to help with testing figures output from Matplotlib";
homepage = "https://github.com/matplotlib/pytest-mpl";
2019-07-14 22:31:28 +01:00
license = licenses.bsd3;
maintainers = [ maintainers.costrouc ];
};
}