##// END OF EJS Templates
ZMQ heartbeat: catch EINTR exceptions and continue....
ZMQ heartbeat: catch EINTR exceptions and continue. The zmq heartbeat channel exits when it encounters an "Interrupted system call", thereby causing the qtconsole to report that it is not responding, despite the console working perfectly fine. Observed in a large Qt application embedding the ipython qtconsole. Fixes #2310

File last commit:

r12221:017ada76
r12301:b4ca80e2
Show More
test_coalescestreams.py
38 lines | 1.4 KiB | text/x-python | PythonLexer
"""
Module with tests for the coalescestreams preprocessor
"""
#-----------------------------------------------------------------------------
# Copyright (c) 2013, the IPython Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
# Imports
#-----------------------------------------------------------------------------
from .base import PreprocessorTestsBase
from ..coalescestreams import coalesce_streams
#-----------------------------------------------------------------------------
# Class
#-----------------------------------------------------------------------------
class TestCoalesceStreams(PreprocessorTestsBase):
"""Contains test functions for coalescestreams.py"""
def test_coalesce_streams(self):
"""coalesce_streams preprocessor output test"""
nb = self.build_notebook()
res = self.build_resources()
nb, res = coalesce_streams(nb, res)
outputs = nb.worksheets[0].cells[0].outputs
self.assertEqual(outputs[0].text, "a")
self.assertEqual(outputs[1].output_type, "text")
self.assertEqual(outputs[2].text, "cd")
self.assertEqual(outputs[3].text, "ef")