@@ -29,7 +29,7 @@ def _check_master(kc, expected=True, stream="stdout"):
2929 execute (kc = kc , code = "import sys" )
3030 flush_channels (kc )
3131 msg_id , content = execute (kc = kc , code = "print (sys.%s._is_master_process())" % stream )
32- stdout , stderr = assemble_output (kc .iopub_channel )
32+ stdout , stderr = assemble_output (kc .get_iopub_msg )
3333 assert stdout .strip () == repr (expected )
3434
3535
@@ -46,7 +46,7 @@ def test_simple_print():
4646 with kernel () as kc :
4747 iopub = kc .iopub_channel
4848 msg_id , content = execute (kc = kc , code = "print ('hi')" )
49- stdout , stderr = assemble_output (iopub )
49+ stdout , stderr = assemble_output (kc . get_iopub_msg )
5050 assert stdout == 'hi\n '
5151 assert stderr == ''
5252 _check_master (kc , expected = True )
@@ -56,7 +56,7 @@ def test_sys_path():
5656 """test that sys.path doesn't get messed up by default"""
5757 with kernel () as kc :
5858 msg_id , content = execute (kc = kc , code = "import sys; print(repr(sys.path))" )
59- stdout , stderr = assemble_output (kc .iopub_channel )
59+ stdout , stderr = assemble_output (kc .get_iopub_msg )
6060 # for error-output on failure
6161 sys .stderr .write (stderr )
6262
@@ -69,7 +69,7 @@ def test_sys_path_profile_dir():
6969
7070 with new_kernel (['--profile-dir' , locate_profile ('default' )]) as kc :
7171 msg_id , content = execute (kc = kc , code = "import sys; print(repr(sys.path))" )
72- stdout , stderr = assemble_output (kc .iopub_channel )
72+ stdout , stderr = assemble_output (kc .get_iopub_msg )
7373 # for error-output on failure
7474 sys .stderr .write (stderr )
7575
@@ -100,7 +100,7 @@ def test_subprocess_print():
100100 ])
101101
102102 msg_id , content = execute (kc = kc , code = code )
103- stdout , stderr = assemble_output (iopub )
103+ stdout , stderr = assemble_output (kc . get_iopub_msg )
104104 nt .assert_equal (stdout .count ("hello" ), np , stdout )
105105 for n in range (np ):
106106 nt .assert_equal (stdout .count (str (n )), 1 , stdout )
@@ -124,7 +124,7 @@ def test_subprocess_noprint():
124124 ])
125125
126126 msg_id , content = execute (kc = kc , code = code )
127- stdout , stderr = assemble_output (iopub )
127+ stdout , stderr = assemble_output (kc . get_iopub_msg )
128128 assert stdout == ''
129129 assert stderr == ''
130130
@@ -150,7 +150,7 @@ def test_subprocess_error():
150150 ])
151151
152152 msg_id , content = execute (kc = kc , code = code )
153- stdout , stderr = assemble_output (iopub )
153+ stdout , stderr = assemble_output (kc . get_iopub_msg )
154154 assert stdout == ''
155155 assert "ValueError" in stderr
156156
@@ -176,7 +176,7 @@ def test_raw_input():
176176 kc .input (text )
177177 reply = kc .get_shell_msg (block = True , timeout = TIMEOUT )
178178 assert reply ['content' ]['status' ] == 'ok'
179- stdout , stderr = assemble_output (iopub )
179+ stdout , stderr = assemble_output (kc . get_iopub_msg )
180180 assert stdout == text + "\n "
181181
182182
@@ -318,14 +318,14 @@ def test_unc_paths():
318318 kc .execute ("cd {0:s}" .format (unc_file_path ))
319319 reply = kc .get_shell_msg (block = True , timeout = TIMEOUT )
320320 assert reply ['content' ]['status' ] == 'ok'
321- out , err = assemble_output (iopub )
321+ out , err = assemble_output (kc . get_iopub_msg )
322322 assert unc_file_path in out
323323
324324 flush_channels (kc )
325325 kc .execute (code = "ls" )
326326 reply = kc .get_shell_msg (block = True , timeout = TIMEOUT )
327327 assert reply ['content' ]['status' ] == 'ok'
328- out , err = assemble_output (iopub )
328+ out , err = assemble_output (kc . get_iopub_msg )
329329 assert 'unc.txt' in out
330330
331331 kc .execute (code = "cd" )
0 commit comments