python3Packages.colorcet: switch to pytestCheckHook

conduit-nginx
Fabian Affolter 2021-10-22 11:42:32 +02:00
parent 82407152f5
commit 76638545c8
1 changed files with 13 additions and 10 deletions

View File

@ -1,12 +1,11 @@
{ lib { lib
, buildPythonPackage , buildPythonPackage
, fetchPypi , fetchPypi
, nbsmoke
, param , param
, pyct , pyct
, nbsmoke
, flake8
, pytest
, pytest-mpl , pytest-mpl
, pytestCheckHook
}: }:
buildPythonPackage rec { buildPythonPackage rec {
@ -24,25 +23,29 @@ buildPythonPackage rec {
]; ];
checkInputs = [ checkInputs = [
pytest
flake8
pytest-mpl pytest-mpl
pytestCheckHook
]; ];
checkPhase = '' preCheck = ''
export HOME=$(mktemp -d) export HOME=$(mktemp -d)
mkdir -p $HOME/.config/matplotlib mkdir -p $HOME/.config/matplotlib
echo "backend: ps" > $HOME/.config/matplotlib/matplotlibrc echo "backend: ps" > $HOME/.config/matplotlib/matplotlibrc
ln -s $HOME/.config/matplotlib $HOME/.matplotlib ln -s $HOME/.config/matplotlib $HOME/.matplotlib
# requires other backends to be available
pytest colorcet -k 'not matplotlib_default_colormap_plot'
''; '';
disabledTests = [
"matplotlib_default_colormap_plot"
];
pythonImportsCheck = [
"colorcet"
];
meta = with lib; { meta = with lib; {
description = "Collection of perceptually uniform colormaps"; description = "Collection of perceptually uniform colormaps";
homepage = "https://colorcet.pyviz.org"; homepage = "https://colorcet.pyviz.org";
license = licenses.cc-by-40; license = licenses.cc-by-40;
maintainers = [ maintainers.costrouc ]; maintainers = with maintainers; [ costrouc ];
}; };
} }