Fix script running IPython tests

* tests/python/ipnbdoctest.py: skip test when jupyter is not found
This commit is contained in:
Maximilien Colange 2017-11-24 14:36:24 +01:00
parent 7b2517a518
commit d358521b3a

View file

@ -35,8 +35,12 @@ except ImportError:
try: try:
from IPython.kernel import KernelManager from IPython.kernel import KernelManager
except ImportError: except ImportError:
try:
from IPython.zmq.blockingkernelmanager \ from IPython.zmq.blockingkernelmanager \
import BlockingKernelManager as KernelManager import BlockingKernelManager as KernelManager
except:
print('IPython is needed to run this script.')
sys.exit(77)
# Until Debian Stable ships IPython >3.0, we stick to the v3 format. # Until Debian Stable ships IPython >3.0, we stick to the v3 format.
try: try: