##// END OF EJS Templates
Don't assume test case for %time will finish in 0 time....
Thomas Kluyver -
Show More
@@ -283,13 +283,13 b' def test_tb_syntaxerror():'
283 def test_time():
283 def test_time():
284 ip = get_ipython()
284 ip = get_ipython()
285
285
286 with tt.AssertPrints("CPU times: user 0 ns, sys: 0 ns, total: 0 ns"):
286 with tt.AssertPrints("CPU times: user "):
287 ip.run_cell("%time None")
287 ip.run_cell("%time None")
288
288
289 ip.run_cell("def f(kmjy):\n"
289 ip.run_cell("def f(kmjy):\n"
290 " %time print (2*kmjy)")
290 " %time print (2*kmjy)")
291
291
292 with tt.AssertPrints("CPU times: user 0 ns, sys: 0 ns, total: 0 ns"):
292 with tt.AssertPrints("CPU times: user "):
293 with tt.AssertPrints("hihi", suppress=False):
293 with tt.AssertPrints("hihi", suppress=False):
294 ip.run_cell("f('hi')")
294 ip.run_cell("f('hi')")
295
295
General Comments 0
You need to be logged in to leave comments. Login now