We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 734809d commit 1f1c6e2Copy full SHA for 1f1c6e2
test.py
@@ -4,16 +4,11 @@
4
import pytest
5
6
7
-def notebook_runner(notebook_path):
+@pytest.mark.parametrize("notebook_path", glob.glob(os.path.join(os.path.dirname(__file__), "*.ipynb")))
8
+def test_notebook_runner(notebook_path):
9
"""
10
This pytest function runs all the ipynb files in the repository
11
using papermill - a notebook runner that throws if any exception occurs while executing the notebook
12
13
# Run all the notebooks in the repository
14
pm.execute_notebook(notebook_path, "-")
-
15
16
17
-parameterizer = pytest.mark.parametrize("notebook_path", glob.glob(os.path.join(os.path.dirname(__file__), "*.ipynb")))
18
-# this variable (Which is a function) will be executed when pytest triggers the test
19
-test_notebooks = parameterizer(notebook_runner)
0 commit comments