From 2862a8fd6259af612b25a3914ddc30a071c336f9 2013-02-04 05:12:06 From: MinRK Date: 2013-02-04 05:12:06 Subject: [PATCH] resolve rebase conflict s/sub_channel/iopub_channel/ --- diff --git a/IPython/kernel/tests/test_message_spec.py b/IPython/kernel/tests/test_message_spec.py index 4ab143d..71fb1a7 100644 --- a/IPython/kernel/tests/test_message_spec.py +++ b/IPython/kernel/tests/test_message_spec.py @@ -50,7 +50,7 @@ def flush_channels(km=None): if km is None: km = KM """flush any messages waiting on the queue""" - for channel in (KM.shell_channel, KM.iopub_channel): + for channel in (km.shell_channel, km.iopub_channel): while True: try: msg = channel.get_msg(block=True, timeout=0.1) diff --git a/IPython/zmq/tests/test_kernel.py b/IPython/zmq/tests/test_kernel.py index b6875f9..d282b87 100644 --- a/IPython/zmq/tests/test_kernel.py +++ b/IPython/zmq/tests/test_kernel.py @@ -108,14 +108,14 @@ def _check_mp_mode(km, expected=False, stream="stdout"): execute(km=km, code="import sys") flush_channels(km) msg_id, content = execute(km=km, code="print (sys.%s._check_mp_mode())" % stream) - stdout, stderr = assemble_output(km.sub_channel) + stdout, stderr = assemble_output(km.iopub_channel) nt.assert_equal(eval(stdout.strip()), expected) def test_simple_print(): """simple print statement in kernel""" with new_kernel() as km: - iopub = km.sub_channel + iopub = km.iopub_channel msg_id, content = execute(km=km, code="print ('hi')") stdout, stderr = assemble_output(iopub) nt.assert_equal(stdout, 'hi\n') @@ -127,7 +127,7 @@ def test_simple_print(): def test_subprocess_print(): """printing from forked mp.Process""" with new_kernel() as km: - iopub = km.sub_channel + iopub = km.iopub_channel _check_mp_mode(km, expected=False) flush_channels(km) @@ -158,7 +158,7 @@ def test_subprocess_print(): def test_subprocess_noprint(): """mp.Process without print doesn't trigger iostream mp_mode""" with new_kernel() as km: - iopub = km.sub_channel + iopub = km.iopub_channel np = 5 code = '\n'.join([ @@ -182,7 +182,7 @@ def test_subprocess_noprint(): def test_subprocess_error(): """error in mp.Process doesn't crash""" with new_kernel() as km: - iopub = km.sub_channel + iopub = km.iopub_channel code = '\n'.join([ "import multiprocessing as mp",