Show More
@@ -391,7 +391,6 b' class ConnectionFileMixin(HasTraits):' | |||||
391 | _connection_file_written = Bool(False) |
|
391 | _connection_file_written = Bool(False) | |
392 |
|
392 | |||
393 | transport = CaselessStrEnum(['tcp', 'ipc'], default_value='tcp', config=True) |
|
393 | transport = CaselessStrEnum(['tcp', 'ipc'], default_value='tcp', config=True) | |
394 | signature_scheme = Unicode('') |
|
|||
395 |
|
394 | |||
396 | ip = Unicode(LOCALHOST, config=True, |
|
395 | ip = Unicode(LOCALHOST, config=True, | |
397 | help="""Set the kernel\'s IP address [default localhost]. |
|
396 | help="""Set the kernel\'s IP address [default localhost]. | |
@@ -439,7 +438,8 b' class ConnectionFileMixin(HasTraits):' | |||||
439 | stdin_port=self.stdin_port, |
|
438 | stdin_port=self.stdin_port, | |
440 | hb_port=self.hb_port, |
|
439 | hb_port=self.hb_port, | |
441 | control_port=self.control_port, |
|
440 | control_port=self.control_port, | |
442 | signature_scheme=self.signature_scheme, |
|
441 | signature_scheme=self.session.signature_scheme, | |
|
442 | key=self.session.key, | |||
443 | ) |
|
443 | ) | |
444 |
|
444 | |||
445 | def cleanup_connection_file(self): |
|
445 | def cleanup_connection_file(self): | |
@@ -476,7 +476,7 b' class ConnectionFileMixin(HasTraits):' | |||||
476 | stdin_port=self.stdin_port, iopub_port=self.iopub_port, |
|
476 | stdin_port=self.stdin_port, iopub_port=self.iopub_port, | |
477 | shell_port=self.shell_port, hb_port=self.hb_port, |
|
477 | shell_port=self.shell_port, hb_port=self.hb_port, | |
478 | control_port=self.control_port, |
|
478 | control_port=self.control_port, | |
479 | signature_scheme=self.signature_scheme, |
|
479 | signature_scheme=self.session.signature_scheme, | |
480 | ) |
|
480 | ) | |
481 | # write_connection_file also sets default ports: |
|
481 | # write_connection_file also sets default ports: | |
482 | for name in port_names: |
|
482 | for name in port_names: |
@@ -48,3 +48,14 b' class TestKernelManager(TestCase):' | |||||
48 | km = self._get_ipc_km() |
|
48 | km = self._get_ipc_km() | |
49 | self._run_lifecycle(km) |
|
49 | self._run_lifecycle(km) | |
50 |
|
50 | |||
|
51 | def test_get_connect_info(self): | |||
|
52 | km = self._get_tcp_km() | |||
|
53 | cinfo = km.get_connection_info() | |||
|
54 | keys = sorted(cinfo.keys()) | |||
|
55 | expected = sorted([ | |||
|
56 | 'ip', 'transport', | |||
|
57 | 'hb_port', 'shell_port', 'stdin_port', 'iopub_port', 'control_port', | |||
|
58 | 'key', 'signature_scheme', | |||
|
59 | ]) | |||
|
60 | self.assertEqual(keys, expected) | |||
|
61 |
General Comments 0
You need to be logged in to leave comments.
Login now