Skip to content

Commit

Permalink
Skip stderr checks in nbval (#358)
Browse files Browse the repository at this point in the history
* Add conftest

* temporarily disable snapshot test

* Add init file

* move conftest, fix up deprecated flags

* Add the conftest file properly

* pull back everything but stderr

* make it a tuple

* fix various hook issues

* bring back snapshots

* revert typos
  • Loading branch information
IAlibay authored Jan 15, 2024
1 parent f93cb87 commit d8b12ab
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Empty file added doc/source/examples/__init__.py
Empty file.
6 changes: 6 additions & 0 deletions doc/source/examples/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# type: ignore


def pytest_collectstart(collector):
if collector.fspath and collector.fspath.ext == ".ipynb":
collector.skip_compare += ("stderr",)
1 change: 1 addition & 0 deletions mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
mypy_path = doc/source/scripts/
exclude =
conf.py
conftest.py
2 changes: 1 addition & 1 deletion tests/pytest.ini
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit d8b12ab

Please sign in to comment.