From 2e9dee88b4a65c297a7179d126b4d6fae1feb75e 2013-02-08 12:26:14 From: Thomas Kluyver Date: 2013-02-08 12:26:14 Subject: [PATCH] Don't assume test case for %time will finish in 0 time. Closes gh-2899 --- diff --git a/IPython/core/tests/test_magic.py b/IPython/core/tests/test_magic.py index 1f70569..42a731f 100644 --- a/IPython/core/tests/test_magic.py +++ b/IPython/core/tests/test_magic.py @@ -283,13 +283,13 @@ def test_tb_syntaxerror(): def test_time(): ip = get_ipython() - with tt.AssertPrints("CPU times: user 0 ns, sys: 0 ns, total: 0 ns"): + with tt.AssertPrints("CPU times: user "): ip.run_cell("%time None") ip.run_cell("def f(kmjy):\n" " %time print (2*kmjy)") - with tt.AssertPrints("CPU times: user 0 ns, sys: 0 ns, total: 0 ns"): + with tt.AssertPrints("CPU times: user "): with tt.AssertPrints("hihi", suppress=False): ip.run_cell("f('hi')")