diff --git a/IPython/core/tests/test_displayhook.py b/IPython/core/tests/test_displayhook.py index 01b2d72..bae37c1 100644 --- a/IPython/core/tests/test_displayhook.py +++ b/IPython/core/tests/test_displayhook.py @@ -1 +1,19 @@ -code +from IPython.testing.tools import AssertPrints, AssertNotPrints + +def test_output_displayed(): + """Checking to make sure that output is displayed""" + + with AssertPrints('2'): + ip.run_cell('1+1') + + with AssertPrints('2'): + ip.run_cell('1+1 # comment with a semicolon;') + +def test_output_quiet(): + """Checking to make sure that output is quiet""" + + with AssertNotPrints('2'): + ip.run_cell('1+1;') + + with AssertNotPrints('2'): + ip.run_cell('1+1; # comment with a semicolon')