Skip to content

Commit

Permalink
Test example notebooks with nbmake
Browse files Browse the repository at this point in the history
I'll come back later to update the Python scripts and test them.
  • Loading branch information
mdpiper committed Aug 17, 2024
1 parent b47bc66 commit 80d9578
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
17 changes: 17 additions & 0 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,23 @@ def test_bmi(session: nox.Session) -> None:
)


@nox.session(name="test-notebooks", python=PYTHON_VERSIONS[-1])
def test_notebooks(session: nox.Session) -> None:
"""Test the notebooks."""
session.install(".[testing,examples]")
session.install("nbmake")

args = [
"examples",
"--nbmake",
"--nbmake-kernel=python3",
"--nbmake-timeout=3000",
"-vvv",
] + session.posargs

session.run("pytest", *args)


@nox.session
def lint(session: nox.Session) -> None:
"""Clean lint and assert style."""
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ addopts = """
--durations 16
--doctest-modules
-vvv
--ignore-glob=examples/*.py
"""
doctest_optionflags = [
"NORMALIZE_WHITESPACE",
Expand Down

0 comments on commit 80d9578

Please sign in to comment.