Show More
@@ -450,6 +450,19 b' def test_timeit_arguments():' | |||
|
450 | 450 | _ip.magic("timeit ('#')") |
|
451 | 451 | |
|
452 | 452 | |
|
453 | def test_timeit_cell(): | |
|
454 | "Test %%timeit called in cell mode" | |
|
455 | from IPython.core.magic import register_line_magic | |
|
456 | ||
|
457 | @register_line_magic | |
|
458 | def lmagic(line): | |
|
459 | ip = get_ipython() | |
|
460 | ip.user_ns['lmagic_out'] = line | |
|
461 | ||
|
462 | _ip.run_cell_magic('timeit', '-n1 -r1', '%lmagic my line') | |
|
463 | nt.assert_equal(_ip.user_ns['lmagic_out'], 'my line') | |
|
464 | ||
|
465 | ||
|
453 | 466 | @dec.skipif(execution.profile is None) |
|
454 | 467 | def test_prun_quotes(): |
|
455 | 468 | "Test that prun does not clobber string escapes (GH #1302)" |
General Comments 0
You need to be logged in to leave comments.
Login now