Merge pull request #5111 from takluyver/nbconvert6-tests-notsoisolated

Fix running tests with nbconvert 6 prerelease
This commit is contained in:
Thomas Kluyver 2019-12-14 19:13:45 +01:00 committed by GitHub
commit d0a74353e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View File

@ -124,12 +124,15 @@ class NotebookTestBase(TestCase):
cls.notebook_dir = tmp('notebooks') cls.notebook_dir = tmp('notebooks')
cls.env_patch = patch.dict('os.environ', cls.get_patch_env()) cls.env_patch = patch.dict('os.environ', cls.get_patch_env())
cls.env_patch.start() cls.env_patch.start()
# Patch systemwide & user-wide data & config directories, to isolate
# the tests from oddities of the local setup. But leave Python env
# locations alone, so data files for e.g. nbconvert are accessible.
# If this isolation isn't sufficient, you may need to run the tests in
# a virtualenv or conda env.
cls.path_patch = patch.multiple( cls.path_patch = patch.multiple(
jupyter_core.paths, jupyter_core.paths,
SYSTEM_JUPYTER_PATH=[tmp('share', 'jupyter')], SYSTEM_JUPYTER_PATH=[tmp('share', 'jupyter')],
ENV_JUPYTER_PATH=[tmp('env', 'share', 'jupyter')],
SYSTEM_CONFIG_PATH=[tmp('etc', 'jupyter')], SYSTEM_CONFIG_PATH=[tmp('etc', 'jupyter')],
ENV_CONFIG_PATH=[tmp('env', 'etc', 'jupyter')],
) )
cls.path_patch.start() cls.path_patch.start()

View File

@ -107,7 +107,7 @@ for more information.
'jupyter_core>=4.6.0', 'jupyter_core>=4.6.0',
'jupyter_client>=5.3.4', 'jupyter_client>=5.3.4',
'nbformat', 'nbformat',
'nbconvert<6', 'nbconvert',
'ipykernel', # bless IPython kernel for now 'ipykernel', # bless IPython kernel for now
'Send2Trash', 'Send2Trash',
'terminado>=0.8.1', 'terminado>=0.8.1',