##// END OF EJS Templates
Merge pull request #2271 from minrk/display_send_figure...
Merge pull request #2271 from minrk/display_send_figure use display instead of send_figure in inline backend hooks This lets custom display functions (e.g. HTML) be used without any extra changes (see #2234). possible downsides: * The previous code guarantees that only one format is published. If multiple figure formatters are registered, display will send them all. * If people for some reason disable the type-printers, then they will display the automatic figure display. **Backwards-incompatible change** Note that `IPython.zmq.pylab.backend_inline.send_figure` has been removed, as `display()` can do the same job and we avoid an unnecessary special-case code path.

File last commit:

r7876:ae3a5bcc
r8179:4a1728aa merge
Show More
test_kernelsession.py
27 lines | 835 B | text/x-python | PythonLexer
"""Tests for the notebook kernel and session manager."""
from unittest import TestCase
from IPython.frontend.html.notebook.kernelmanager import MultiKernelManager
class TestKernelManager(TestCase):
def test_km_lifecycle(self):
km = MultiKernelManager()
kid = km.start_kernel()
self.assertTrue(kid in km)
self.assertEqual(len(km),1)
km.kill_kernel(kid)
self.assertTrue(not kid in km)
kid = km.start_kernel()
self.assertEqual('127.0.0.1',km.get_kernel_ip(kid))
port_dict = km.get_kernel_ports(kid)
self.assertTrue('stdin_port' in port_dict)
self.assertTrue('iopub_port' in port_dict)
self.assertTrue('shell_port' in port_dict)
self.assertTrue('hb_port' in port_dict)
km.get_kernel(kid)
km.kill_kernel(kid)