tests: update to work with Jupyter 4.2

Jupyter 4.2 just landed in Debian unstable, so we have a few failures
because of all the renamings.

* tests/python/ipnbdoctest.py: Adjust imports for Jupyter 4.2.
This commit is contained in:
Alexandre Duret-Lutz 2016-11-05 23:14:21 +01:00
parent 0b7b03c7d2
commit 939e713e09

View file

@ -30,13 +30,19 @@ except:
sys.exit(77) sys.exit(77)
try: try:
from IPython.kernel import KernelManager from jupyter_client import KernelManager
except ImportError: except ImportError:
try:
from IPython.kernel import KernelManager
except ImportError:
from IPython.zmq.blockingkernelmanager \ from IPython.zmq.blockingkernelmanager \
import BlockingKernelManager as KernelManager import BlockingKernelManager as KernelManager
# Until Debian ships IPython 3.0, we stick to the v3 format. # Until Debian Stable ships IPython >3.0, we stick to the v3 format.
from IPython.nbformat import v3 as nbformat try:
from nbformat import v3 as nbformat
except ImportError:
from IPython.nbformat import v3 as nbformat
def compare_png(a64, b64): def compare_png(a64, b64):
"""compare two b64 PNGs (incomplete)""" """compare two b64 PNGs (incomplete)"""