Skip to content

Commit

Permalink
[tests] Automate Jupyter notebook tests using nbmake.
Browse files Browse the repository at this point in the history
This uses the nbmake pytest plugin to run the Jupyter notebooks in
`make examples-test`.

Fixes #450.
  • Loading branch information
ChrisCummins committed Oct 6, 2021
1 parent 34c0933 commit e4a94f5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ install-test: | install-test-setup
$(call pytest,--no-success-flaky-report --benchmark-disable -n auto -k "not fuzz" --durations=5)

examples-test:
cd examples && pytest --no-success-flaky-report --benchmark-disable -n auto --durations=5 . --cov=compiler_gym --cov-report=xml:$(COV_REPORT) $(PYTEST_ARGS)
cd examples && pytest --nbmake --no-success-flaky-report --benchmark-disable -n auto --durations=5 . --cov=compiler_gym --cov-report=xml:$(COV_REPORT) $(PYTEST_ARGS)

# Note we export $CI=1 so that the tests always run as if within the CI
# environement. This is to ensure that the reported coverage matches that of
Expand Down
1 change: 1 addition & 0 deletions tests/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
flaky==3.7.0
nbmake==0.10
psutil==5.8.0 # Implicit dependency of pytest-xdist
pytest==6.1.0
pytest-benchmark==3.2.3
Expand Down

0 comments on commit e4a94f5

Please sign in to comment.