-
Notifications
You must be signed in to change notification settings - Fork 880
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
- Loading branch information
1 parent
b8bd7e7
commit 5064387
Showing
1 changed file
with
12 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
] | ||
) |