##// END OF EJS Templates
IPython/utils/path.py: Sometimes this system encoding just won't work. So, we try to use it if we can, but fallback to UTF8 if it simply won't work.
IPython/utils/path.py: Sometimes this system encoding just won't work. So, we try to use it if we can, but fallback to UTF8 if it simply won't work.

File last commit:

r21425:d823445d
r21727:60afb1cd
Show More
test_displayhook.py
21 lines | 638 B | text/x-python | PythonLexer
from IPython.testing.tools import AssertPrints, AssertNotPrints
ip = get_ipython()
def test_output_displayed():
"""Checking to make sure that output is displayed"""
with AssertPrints('2'):
ip.run_cell('1+1', store_history=True)
with AssertPrints('2'):
ip.run_cell('1+1 # comment with a semicolon;', store_history=True)
def test_output_quiet():
"""Checking to make sure that output is quiet"""
with AssertNotPrints('2'):
ip.run_cell('1+1;', store_history=True)
with AssertNotPrints('2'):
ip.run_cell('1+1; # comment with a semicolon', store_history=True)