##// END OF EJS Templates
cleanup dangling kernel in test_kernelsession
MinRK -
Show More
@@ -1,26 +1,27 b''
1 1 """Tests for the notebook kernel and session manager."""
2 2
3 3 from unittest import TestCase
4 4
5 5 from IPython.frontend.html.notebook.kernelmanager import MultiKernelManager
6 6
7 7 class TestKernelManager(TestCase):
8 8
9 9 def test_km_lifecycle(self):
10 10 km = MultiKernelManager()
11 11 kid = km.start_kernel()
12 12 self.assert_(kid in km)
13 13 self.assertEquals(len(km),1)
14 14 km.kill_kernel(kid)
15 15 self.assert_(not kid in km)
16 16
17 17 kid = km.start_kernel()
18 18 self.assertEquals('127.0.0.1',km.get_kernel_ip(kid))
19 19 port_dict = km.get_kernel_ports(kid)
20 20 self.assert_('stdin_port' in port_dict)
21 21 self.assert_('iopub_port' in port_dict)
22 22 self.assert_('shell_port' in port_dict)
23 23 self.assert_('hb_port' in port_dict)
24 24 km.get_kernel(kid)
25 km.kill_kernel(kid)
25 26
26 27
General Comments 0
You need to be logged in to leave comments. Login now