Show More
@@ -1,21 +1,21 b'' | |||||
1 | from IPython.testing.tools import AssertPrints, AssertNotPrints |
|
1 | from IPython.testing.tools import AssertPrints, AssertNotPrints | |
2 |
|
2 | |||
3 | ip = get_ipython() |
|
3 | ip = get_ipython() | |
4 |
|
4 | |||
5 | def test_output_displayed(): |
|
5 | def test_output_displayed(): | |
6 | """Checking to make sure that output is displayed""" |
|
6 | """Checking to make sure that output is displayed""" | |
7 |
|
7 | |||
8 | with AssertPrints('2'): |
|
8 | with AssertPrints('2'): | |
9 | ip.run_cell('1+1',store_history=True) |
|
9 | ip.run_cell('1+1', store_history=True) | |
10 |
|
10 | |||
11 | with AssertPrints('2'): |
|
11 | with AssertPrints('2'): | |
12 | ip.run_cell('1+1 # comment with a semicolon;',store_history=True) |
|
12 | ip.run_cell('1+1 # comment with a semicolon;', store_history=True) | |
13 |
|
13 | |||
14 | def test_output_quiet(): |
|
14 | def test_output_quiet(): | |
15 | """Checking to make sure that output is quiet""" |
|
15 | """Checking to make sure that output is quiet""" | |
16 |
|
16 | |||
17 | with AssertNotPrints('2'): |
|
17 | with AssertNotPrints('2'): | |
18 | ip.run_cell('1+1;',store_history=True) |
|
18 | ip.run_cell('1+1;', store_history=True) | |
19 |
|
19 | |||
20 | with AssertNotPrints('2'): |
|
20 | with AssertNotPrints('2'): | |
21 | ip.run_cell('1+1; # comment with a semicolon',store_history=True) |
|
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