Show More
@@ -1,1 +1,19 b'' | |||
|
1 | code | |
|
1 | from IPython.testing.tools import AssertPrints, AssertNotPrints | |
|
2 | ||
|
3 | def test_output_displayed(): | |
|
4 | """Checking to make sure that output is displayed""" | |
|
5 | ||
|
6 | with AssertPrints('2'): | |
|
7 | ip.run_cell('1+1') | |
|
8 | ||
|
9 | with AssertPrints('2'): | |
|
10 | ip.run_cell('1+1 # comment with a semicolon;') | |
|
11 | ||
|
12 | def test_output_quiet(): | |
|
13 | """Checking to make sure that output is quiet""" | |
|
14 | ||
|
15 | with AssertNotPrints('2'): | |
|
16 | ip.run_cell('1+1;') | |
|
17 | ||
|
18 | with AssertNotPrints('2'): | |
|
19 | ip.run_cell('1+1; # comment with a semicolon') |
General Comments 0
You need to be logged in to leave comments.
Login now