diff --git a/example/test_examples.py b/example/test_examples.py index 30d7610..1cd7491 100644 --- a/example/test_examples.py +++ b/example/test_examples.py @@ -56,7 +56,9 @@ def _notebook_run(self, path): Execute a notebook and collect output. Returns (parsed nb object, execution errors) """ - notebook = pytest_notebook.notebook.load_notebook(path=path) + dirname, nb_name = os.path.split(path) + os.chdir(dirname) + notebook = pytest_notebook.notebook.load_notebook(path=nb_name) result = pytest_notebook.execution.execute_notebook( notebook, with_coverage=False,