Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Sep 4, 2024
1 parent b8bd7e7 commit 5064387
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions tests/test_tutorials.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
import pytest
import glob

import pytest

# Locate all notebooks in docs and subdirectories
notebooks = glob.glob("docs/**/*.ipynb", recursive=True)


# Parameterize the test with all found notebooks
@pytest.mark.parametrize("notebook", notebooks)
def test_notebook_execution(notebook):
# This runs each notebook using nbval and ensures there are no errors
pytest.main([
"--nbval",
"--current-env", # Use the current environment
"--sanitize-with", ".sanitize_config.yaml", # Optional: If you want to handle variable output, use this
notebook
])
pytest.main(
[
"--nbval",
"--current-env", # Use the current environment
"--sanitize-with",
".sanitize_config.yaml", # Optional: If you want to handle variable output, use this
notebook,
]
)

0 comments on commit 5064387

Please sign in to comment.