Show More
@@ -416,6 +416,21 b' def test_time():' | |||
|
416 | 416 | with tt.AssertPrints("hihi", suppress=False): |
|
417 | 417 | ip.run_cell("f('hi')") |
|
418 | 418 | |
|
419 | # ';' at the end of %time prevents instruction value to be printed. | |
|
420 | # This tests fix for #13837 | |
|
421 | def test_time_no_outputwith_semicolon(): | |
|
422 | ip = get_ipython() | |
|
423 | ||
|
424 | with tt.AssertPrints(" 123456"): | |
|
425 | with tt.AssertPrints("Wall time: ", suppress=False): | |
|
426 | with tt.AssertPrints("CPU times: ", suppress=False): | |
|
427 | ip.run_cell("%time 123000+456") | |
|
428 | ||
|
429 | with tt.AssertNotPrints(" 123456"): | |
|
430 | with tt.AssertPrints("Wall time: ", suppress=False): | |
|
431 | with tt.AssertPrints("CPU times: ", suppress=False): | |
|
432 | ip.run_cell("%time 123000+456;") | |
|
433 | ||
|
419 | 434 | def test_time_last_not_expression(): |
|
420 | 435 | ip.run_cell("%%time\n" |
|
421 | 436 | "var_1 = 1\n" |
General Comments 0
You need to be logged in to leave comments.
Login now