##// END OF EJS Templates
make the tests fail correctly
nottaanibot -
Show More
@@ -1,19 +1,21
1 1 from IPython.testing.tools import AssertPrints, AssertNotPrints
2 2
3 ip = get_ipython()
4
3 5 def test_output_displayed():
4 6 """Checking to make sure that output is displayed"""
5 7
6 8 with AssertPrints('2'):
7 ip.run_cell('1+1')
9 ip.run_cell('1+1',store_history=True)
8 10
9 11 with AssertPrints('2'):
10 ip.run_cell('1+1 # comment with a semicolon;')
12 ip.run_cell('1+1 # comment with a semicolon;',store_history=True)
11 13
12 14 def test_output_quiet():
13 15 """Checking to make sure that output is quiet"""
14 16
15 17 with AssertNotPrints('2'):
16 ip.run_cell('1+1;')
18 ip.run_cell('1+1;',store_history=True)
17 19
18 20 with AssertNotPrints('2'):
19 ip.run_cell('1+1; # comment with a semicolon')
21 ip.run_cell('1+1; # comment with a semicolon',store_history=True)
General Comments 0
You need to be logged in to leave comments. Login now