summary refs log tree commit diff
path: root/pkgs/development/python-modules
diff options
context:
space:
mode:
authorMaximilian Bosch <maximilian@mbosch.me>2021-05-21 22:57:57 +0200
committerGitHub <noreply@github.com>2021-05-21 22:57:57 +0200
commiteafe77783620f3fd356922970b0ee26fc8d9be59 (patch)
tree222cafaa81cfa92f58915ca72a5751d6134b2ea4 /pkgs/development/python-modules
parente604947beba9c0bf38d5a708e93d135ebe99ceb6 (diff)
parent455832e090dcb90242564bf8063cf92cdfdc061c (diff)
Merge pull request #123921 from acairncross/fix-nbval
python3Packages.nbval: Skip failing tests
Diffstat (limited to 'pkgs/development/python-modules')
-rw-r--r--pkgs/development/python-modules/nbval/default.nix20
1 files changed, 11 insertions, 9 deletions
diff --git a/pkgs/development/python-modules/nbval/default.nix b/pkgs/development/python-modules/nbval/default.nix
index 704bc21d7e1a7..b9a336f7fbe9d 100644
--- a/pkgs/development/python-modules/nbval/default.nix
+++ b/pkgs/development/python-modules/nbval/default.nix
@@ -5,6 +5,7 @@
 , ipykernel
 , jupyter_client
 , nbformat
+, pytestCheckHook
 , pytest
 , six
 , glibcLocales
@@ -23,7 +24,7 @@ buildPythonPackage rec {
   };
 
   checkInputs = [
-    pytest
+    pytestCheckHook
     matplotlib
     sympy
     pytestcov
@@ -40,14 +41,15 @@ buildPythonPackage rec {
     six
   ];
 
-  # Set HOME so that matplotlib doesn't try to use
-  # /homeless-shelter/.config/matplotlib, otherwise some of the tests fail for
-  # having an unexpected warning on stderr produced by matplotlib.
-  # Ignore impure tests.
-  checkPhase = ''
-    export HOME=$(mktemp -d)
-    pytest tests --ignore tests/test_timeouts.py
-  '';
+  pytestFlagsArray = [
+    "tests"
+    # These are the main tests but they're fragile so skip them. They error
+    # whenever matplotlib outputs any unexpected warnings, e.g. deprecation
+    # warnings.
+    "--ignore=tests/test_unit_tests_in_notebooks.py"
+    # Impure
+    "--ignore=tests/test_timeouts.py"
+  ];
 
   # Some of the tests use localhost networking.
   __darwinAllowLocalNetworking = true;