Skip to content

Commit d8b12ab

Browse files
authored
Skip stderr checks in nbval (#358)
* 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
1 parent f93cb87 commit d8b12ab

File tree

5 files changed

+10
-1
lines changed

5 files changed

+10
-1
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ doc/build
3636

3737
# example files
3838
doc/source/examples/**/*.*
39+
!doc/source/examples/conftest.py
40+
!doc/source/examples/__init__.py
3941
!doc/source/examples/**/*.ipynb
4042
!doc/source/examples/**/*.rst
4143
!doc/source/examples/**/*.gif

doc/source/examples/__init__.py

Whitespace-only changes.

doc/source/examples/conftest.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# type: ignore
2+
3+
4+
def pytest_collectstart(collector):
5+
if collector.fspath and collector.fspath.ext == ".ipynb":
6+
collector.skip_compare += ("stderr",)

mypy.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
mypy_path = doc/source/scripts/
33
exclude =
44
conf.py
5+
conftest.py

tests/pytest.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[pytest]
2-
addopts = --nbval --current-env --sanitize-with ./sanitize_output.cfg
2+
addopts = --nbval --nbval-current-env --nbval-sanitize-with ./sanitize_output.cfg
33
testpaths =
44
../doc/source/examples/analysis/volumetric/
55
../doc/source/examples/analysis/custom_parallel_analysis.ipynb

0 commit comments

Comments
 (0)