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:
parent
0b7b03c7d2
commit
939e713e09
1 changed files with 11 additions and 5 deletions
|
|
@ -29,13 +29,19 @@ except:
|
||||||
print('IPython is needed to run this script.')
|
print('IPython is needed to run this script.')
|
||||||
sys.exit(77)
|
sys.exit(77)
|
||||||
|
|
||||||
|
try:
|
||||||
|
from jupyter_client import KernelManager
|
||||||
|
except ImportError:
|
||||||
try:
|
try:
|
||||||
from IPython.kernel import KernelManager
|
from IPython.kernel import KernelManager
|
||||||
except ImportError:
|
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.
|
||||||
|
try:
|
||||||
|
from nbformat import v3 as nbformat
|
||||||
|
except ImportError:
|
||||||
from IPython.nbformat import v3 as nbformat
|
from IPython.nbformat import v3 as nbformat
|
||||||
|
|
||||||
def compare_png(a64, b64):
|
def compare_png(a64, b64):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue