Skip to content

Commit

Permalink
Merge pull request #123921 from acairncross/fix-nbval
Browse files Browse the repository at this point in the history
python3Packages.nbval: Skip failing tests
  • Loading branch information
Ma27 authored May 21, 2021
2 parents e604947 + 455832e commit eafe777
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions pkgs/development/python-modules/nbval/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
, ipykernel
, jupyter_client
, nbformat
, pytestCheckHook
, pytest
, six
, glibcLocales
Expand All @@ -23,7 +24,7 @@ buildPythonPackage rec {
};

checkInputs = [
pytest
pytestCheckHook
matplotlib
sympy
pytestcov
Expand All @@ -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;
Expand Down

0 comments on commit eafe777

Please sign in to comment.