##// END OF EJS Templates
Backport PR #4018: Fix warning when running IPython.kernel tests...
Backport PR #4018: Fix warning when running IPython.kernel tests The signature of TemporaryDirectory.cleanup() changed just before Python 3.2, and our TemporaryWorkingDirectory subclass was receiving an unexpected parameter. This copies in a newer TemporaryDirectory.cleanup() implementation for Python 2.7, and tweaks the subclass to accept the extra parameter.

File last commit:

r12192:dda6330a
r12204:f678391e
Show More
test_start_kernel.py
16 lines | 531 B | text/x-python | PythonLexer
import nose.tools as nt
from .test_embed_kernel import setup, teardown, setup_kernel
TIMEOUT = 15
def test_ipython_start_kernel_userns():
cmd = ('from IPython import start_kernel\n'
'ns = {"tre": 123}\n'
'start_kernel(user_ns=ns)')
with setup_kernel(cmd) as client:
msg_id = client.object_info('tre')
msg = client.get_shell_msg(block=True, timeout=TIMEOUT)
content = msg['content']
assert content['found']
nt.assert_equal(content['string_form'], u'123')