about summary refs log tree commit diff
path: root/pkgs/development/python-modules/colorcet
diff options
context:
space:
mode:
authorFabian Affolter <mail@fabian-affolter.ch>2021-10-22 11:42:32 +0200
committerFabian Affolter <mail@fabian-affolter.ch>2021-10-22 12:05:10 +0200
commit76638545c8e9af9cac48f7bc16f97ef3eabf3ede (patch)
tree5789098548e8c6c760303a333603630a24f7247e /pkgs/development/python-modules/colorcet
parent82407152f50835564a92bb497a8007994802ce51 (diff)
python3Packages.colorcet: switch to pytestCheckHook
Diffstat (limited to 'pkgs/development/python-modules/colorcet')
-rw-r--r--pkgs/development/python-modules/colorcet/default.nix23
1 files changed, 13 insertions, 10 deletions
diff --git a/pkgs/development/python-modules/colorcet/default.nix b/pkgs/development/python-modules/colorcet/default.nix
index 2076533751441..6135730beb00c 100644
--- a/pkgs/development/python-modules/colorcet/default.nix
+++ b/pkgs/development/python-modules/colorcet/default.nix
@@ -1,12 +1,11 @@
 { lib
 , buildPythonPackage
 , fetchPypi
+, nbsmoke
 , param
 , pyct
-, nbsmoke
-, flake8
-, pytest
 , pytest-mpl
+, pytestCheckHook
 }:
 
 buildPythonPackage rec {
@@ -24,25 +23,29 @@ buildPythonPackage rec {
   ];
 
   checkInputs = [
-    pytest
-    flake8
     pytest-mpl
+    pytestCheckHook
   ];
 
-  checkPhase = ''
+  preCheck = ''
     export HOME=$(mktemp -d)
     mkdir -p $HOME/.config/matplotlib
     echo "backend: ps" > $HOME/.config/matplotlib/matplotlibrc
     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; {
     description = "Collection of perceptually uniform colormaps";
     homepage = "https://colorcet.pyviz.org";
     license = licenses.cc-by-40;
-    maintainers = [ maintainers.costrouc ];
+    maintainers = with maintainers; [ costrouc ];
   };
 }