From d358521b3affc559e23fa4c2ad990860d3d81fa4 Mon Sep 17 00:00:00 2001 From: Maximilien Colange Date: Fri, 24 Nov 2017 14:36:24 +0100 Subject: [PATCH] Fix script running IPython tests * tests/python/ipnbdoctest.py: skip test when jupyter is not found --- tests/python/ipnbdoctest.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/python/ipnbdoctest.py b/tests/python/ipnbdoctest.py index 3af3790eb..f8254cc72 100755 --- a/tests/python/ipnbdoctest.py +++ b/tests/python/ipnbdoctest.py @@ -35,8 +35,12 @@ except ImportError: try: from IPython.kernel import KernelManager except ImportError: - from IPython.zmq.blockingkernelmanager \ - import BlockingKernelManager as KernelManager + try: + from IPython.zmq.blockingkernelmanager \ + 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. try: