Skip to content

Commit d0a7435

Browse files
authored
Merge pull request jupyter#5111 from takluyver/nbconvert6-tests-notsoisolated
Fix running tests with nbconvert 6 prerelease
2 parents 5e5ad60 + e53383c commit d0a7435

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

notebook/tests/launchnotebook.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,12 +124,15 @@ def tmp(*parts):
124124
cls.notebook_dir = tmp('notebooks')
125125
cls.env_patch = patch.dict('os.environ', cls.get_patch_env())
126126
cls.env_patch.start()
127+
# Patch systemwide & user-wide data & config directories, to isolate
128+
# the tests from oddities of the local setup. But leave Python env
129+
# locations alone, so data files for e.g. nbconvert are accessible.
130+
# If this isolation isn't sufficient, you may need to run the tests in
131+
# a virtualenv or conda env.
127132
cls.path_patch = patch.multiple(
128133
jupyter_core.paths,
129134
SYSTEM_JUPYTER_PATH=[tmp('share', 'jupyter')],
130-
ENV_JUPYTER_PATH=[tmp('env', 'share', 'jupyter')],
131135
SYSTEM_CONFIG_PATH=[tmp('etc', 'jupyter')],
132-
ENV_CONFIG_PATH=[tmp('env', 'etc', 'jupyter')],
133136
)
134137
cls.path_patch.start()
135138

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@
107107
'jupyter_core>=4.6.0',
108108
'jupyter_client>=5.3.4',
109109
'nbformat',
110-
'nbconvert<6',
110+
'nbconvert',
111111
'ipykernel', # bless IPython kernel for now
112112
'Send2Trash',
113113
'terminado>=0.8.1',

0 commit comments

Comments
 (0)