コード例 #1
0
def test_stdout_flush():
    ipython_shell = MagicMock()
    ipython_display = IpythonDisplay()
    ipython_display._ipython_shell = ipython_shell
    sys.stdout = MagicMock()

    ipython_display.write(u'Testing Stdout Flush è')
    assert sys.stdout.flush.call_count == 1
コード例 #2
0
def test_stdout_flush():
    ipython_shell = MagicMock()
    ipython_display = IpythonDisplay()
    ipython_display._ipython_shell = ipython_shell
    sys.stdout = MagicMock()

    ipython_display.write(u'Testing Stdout Flush è')
    assert sys.stdout.flush.call_count == 1
コード例 #3
0
def test_stderr_flush():
    ipython_shell = MagicMock()
    ipython_display = IpythonDisplay()
    ipython_display._ipython_shell = ipython_shell
    sys.stderr = MagicMock()

    ipython_display.send_error(u'Testing Stderr Flush è')
    assert sys.stderr.flush.call_count == 1
コード例 #4
0
def test_stderr_flush():
    ipython_shell = MagicMock()
    ipython_display = IpythonDisplay()
    ipython_display._ipython_shell = ipython_shell
    sys.stderr = MagicMock()

    ipython_display.send_error(u'Testing Stderr Flush è')
    assert sys.stderr.flush.call_count == 1