diff --git a/.gitignore b/.gitignore index ccc697f5b..56b313732 100644 --- a/.gitignore +++ b/.gitignore @@ -36,6 +36,8 @@ doc/build # example files doc/source/examples/**/*.* +!doc/source/examples/conftest.py +!doc/source/examples/__init__.py !doc/source/examples/**/*.ipynb !doc/source/examples/**/*.rst !doc/source/examples/**/*.gif diff --git a/doc/source/examples/__init__.py b/doc/source/examples/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/doc/source/examples/conftest.py b/doc/source/examples/conftest.py new file mode 100644 index 000000000..8bcb19539 --- /dev/null +++ b/doc/source/examples/conftest.py @@ -0,0 +1,6 @@ +# type: ignore + + +def pytest_collectstart(collector): + if collector.fspath and collector.fspath.ext == ".ipynb": + collector.skip_compare += ("stderr",) diff --git a/mypy.ini b/mypy.ini index 0c95025b6..2537e4bfa 100644 --- a/mypy.ini +++ b/mypy.ini @@ -2,3 +2,4 @@ mypy_path = doc/source/scripts/ exclude = conf.py + conftest.py diff --git a/tests/pytest.ini b/tests/pytest.ini index 695f8b479..246ec2353 100644 --- a/tests/pytest.ini +++ b/tests/pytest.ini @@ -1,5 +1,5 @@ [pytest] -addopts = --nbval --current-env --sanitize-with ./sanitize_output.cfg +addopts = --nbval --nbval-current-env --nbval-sanitize-with ./sanitize_output.cfg testpaths = ../doc/source/examples/analysis/volumetric/ ../doc/source/examples/analysis/custom_parallel_analysis.ipynb