##// END OF EJS Templates
Add prun transform test
Jason Grout -
Show More
@@ -490,6 +490,21 b' def test_timeit_special_syntax():'
490
490
491
491
492 @dec.skipif(execution.profile is None)
492 @dec.skipif(execution.profile is None)
493 def test_prun_special_syntax():
494 "Test %%prun with IPython special syntax"
495 @register_line_magic
496 def lmagic(line):
497 ip = get_ipython()
498 ip.user_ns['lmagic_out'] = line
499
500 # line mode test
501 _ip.run_line_magic('prun', '-q %lmagic my line')
502 nt.assert_equal(_ip.user_ns['lmagic_out'], 'my line')
503 # cell mode test
504 _ip.run_cell_magic('prun', '-q', '%lmagic my line2')
505 nt.assert_equal(_ip.user_ns['lmagic_out'], 'my line2')
506
507 @dec.skipif(execution.profile is None)
493 def test_prun_quotes():
508 def test_prun_quotes():
494 "Test that prun does not clobber string escapes (GH #1302)"
509 "Test that prun does not clobber string escapes (GH #1302)"
495 _ip.magic(r"prun -q x = '\t'")
510 _ip.magic(r"prun -q x = '\t'")
General Comments 0
You need to be logged in to leave comments. Login now