Test %%prun with IPython special syntax
()
| 692 | |
| 693 | @dec.skipif(execution.profile is None) |
| 694 | def test_prun_special_syntax(): |
| 695 | "Test %%prun with IPython special syntax" |
| 696 | @register_line_magic |
| 697 | def lmagic(line): |
| 698 | ip = get_ipython() |
| 699 | ip.user_ns['lmagic_out'] = line |
| 700 | |
| 701 | # line mode test |
| 702 | _ip.run_line_magic('prun', '-q %lmagic my line') |
| 703 | nt.assert_equal(_ip.user_ns['lmagic_out'], 'my line') |
| 704 | # cell mode test |
| 705 | _ip.run_cell_magic('prun', '-q', '%lmagic my line2') |
| 706 | nt.assert_equal(_ip.user_ns['lmagic_out'], 'my line2') |
| 707 | |
| 708 | @dec.skipif(execution.profile is None) |
| 709 | def test_prun_quotes(): |
nothing calls this directly
no test coverage detected