##// END OF EJS Templates
Backport PR #2662: qtconsole: wrap argument list in tooltip to match width of text body...
Backport PR #2662: qtconsole: wrap argument list in tooltip to match width of text body previously, a function with a long argument list would produce a very wide tooltip, hurting readability. Since the width of the docstring body is chosen by the developer whereas the formatting of the argument list is currently not, it's reasonable to wrap the argument list width to the maximum of a) 80 characters, or b) maximum length of a line in the docstring body. This improves readability, without unduly affecting the appearence of the docstring body itself. closes #2661 I'm happy to add any additional tests or make any changes required to get this merged.

File last commit:

r5629:ba0b0dbd
r9846:43e0fc22
Show More
test_kernelsession.py
27 lines | 819 B | text/x-python | PythonLexer
Brian E. Granger
Refactoring the notebook app to support the new config system.
r4344 """Tests for the notebook kernel and session manager."""
Brian E. Granger
Refactored htmlnotebook session and kernel manager....
r4343
from unittest import TestCase
MinRK
use zmq.KernelManager to manage individual kernels in notebook...
r4960 from IPython.frontend.html.notebook.kernelmanager import MultiKernelManager
Brian E. Granger
Refactored htmlnotebook session and kernel manager....
r4343
class TestKernelManager(TestCase):
def test_km_lifecycle(self):
MinRK
use zmq.KernelManager to manage individual kernels in notebook...
r4960 km = MultiKernelManager()
Brian E. Granger
Refactored htmlnotebook session and kernel manager....
r4343 kid = km.start_kernel()
self.assert_(kid in km)
self.assertEquals(len(km),1)
km.kill_kernel(kid)
self.assert_(not kid in km)
kid = km.start_kernel()
self.assertEquals('127.0.0.1',km.get_kernel_ip(kid))
port_dict = km.get_kernel_ports(kid)
self.assert_('stdin_port' in port_dict)
self.assert_('iopub_port' in port_dict)
self.assert_('shell_port' in port_dict)
self.assert_('hb_port' in port_dict)
MinRK
use zmq.KernelManager to manage individual kernels in notebook...
r4960 km.get_kernel(kid)
MinRK
cleanup dangling kernel in test_kernelsession
r5629 km.kill_kernel(kid)
Brian E. Granger
Refactored htmlnotebook session and kernel manager....
r4343