File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change 4
4
import pytest
5
5
6
6
7
- def notebook_runner (notebook_path ):
7
+ @pytest .mark .parametrize ("notebook_path" , glob .glob (os .path .join (os .path .dirname (__file__ ), "*.ipynb" )))
8
+ def test_notebook_runner (notebook_path ):
8
9
"""
9
10
This pytest function runs all the ipynb files in the repository
10
11
using papermill - a notebook runner that throws if any exception occurs while executing the notebook
11
12
"""
12
13
# Run all the notebooks in the repository
13
14
pm .execute_notebook (notebook_path , "-" )
14
-
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 )
You can’t perform that action at this time.
0 commit comments