File tree Expand file tree Collapse file tree 1 file changed +14
-5
lines changed
Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change 11from .test_embed_kernel import setup_kernel
22from flaky import flaky
3+ from textwrap import dedent
34
45TIMEOUT = 15
56
67
78@flaky (max_runs = 3 )
89def test_ipython_start_kernel_userns ():
9- cmd = ('from IPython import start_kernel\n '
10- 'ns = {"tre": 123}\n '
11- 'start_kernel(user_ns=ns)' )
10+ cmd = dedent (
11+ """
12+ from ipykernel.kernelapp import launch_new_instance
13+ ns = {"tre": 123}
14+ launch_new_instance(user_ns=ns)
15+ """
16+ )
1217
1318 with setup_kernel (cmd ) as client :
1419 client .inspect ("tre" )
@@ -34,8 +39,12 @@ def test_ipython_start_kernel_userns():
3439@flaky (max_runs = 3 )
3540def test_ipython_start_kernel_no_userns ():
3641 # Issue #4188 - user_ns should be passed to shell as None, not {}
37- cmd = ('from IPython import start_kernel\n '
38- 'start_kernel()' )
42+ cmd = dedent (
43+ """
44+ from ipykernel.kernelapp import launch_new_instance
45+ launch_new_instance()
46+ """
47+ )
3948
4049 with setup_kernel (cmd ) as client :
4150 # user_module should not be an instance of DummyMod
You can’t perform that action at this time.
0 commit comments