Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions notebook/tests/launchnotebook.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,11 @@ def tmp(*parts):
cls.notebook_dir = tmp('notebooks')
cls.env_patch = patch.dict('os.environ', cls.get_patch_env())
cls.env_patch.start()
# nbconvert >= 6 installs the templates in $prefix/share/jupyter/nbconvert/templates
# so we cannot run the test with the patched jupyter_core.paths
jupyter_path_before_patch = jupyter_core.paths.jupyter_path()
cls.notebook_exporter_patch = patch('nbconvert.exporters.templateexporter.jupyter_path', lambda: jupyter_path_before_patch)
cls.notebook_exporter_patch.start()
cls.path_patch = patch.multiple(
jupyter_core.paths,
SYSTEM_JUPYTER_PATH=[tmp('share', 'jupyter')],
Expand Down Expand Up @@ -185,6 +190,7 @@ def teardown_class(cls):
cls.notebook.stop()
cls.wait_until_dead()
cls.env_patch.stop()
cls.notebook_exporter_patch.stop()
cls.path_patch.stop()
cls.tmp_dir.cleanup()
# cleanup global zmq Context, to ensure we aren't leaving dangling sockets
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
'jupyter_core>=4.6.0',
'jupyter_client>=5.3.4',
'nbformat',
'nbconvert<6',
'nbconvert',
'ipykernel', # bless IPython kernel for now
'Send2Trash',
'terminado>=0.8.1',
Expand Down