depot/third_party/nixpkgs/pkgs/development/python-modules/pytest-mpl/default.nix
Default email bb584b27e9 Project import generated by Copybara.
GitOrigin-RevId: 5181d5945eda382ff6a9ca3e072ed6ea9b547fee
2022-04-15 03:41:22 +02:00

53 lines
1,023 B
Nix

{ lib
, buildPythonPackage
, fetchPypi
, pytest
, matplotlib
, nose
, pillow
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "pytest-mpl";
version = "0.14.0";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-iE4HjS1TgK9WQzhOIzw1jpZZgl+y2X/9r48YXENMjYk=";
};
buildInputs = [
pytest
];
propagatedBuildInputs = [
matplotlib
nose
pillow
];
checkInputs = [
pytestCheckHook
];
# 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
'';
meta = with lib; {
description = "Pytest plugin to help with testing figures output from Matplotlib";
homepage = "https://github.com/matplotlib/pytest-mpl";
license = licenses.bsd3;
maintainers = [ maintainers.costrouc ];
};
}