diff --git a/IPython/core/tests/test_magic.py b/IPython/core/tests/test_magic.py index ecd40e0..62bd25a 100644 --- a/IPython/core/tests/test_magic.py +++ b/IPython/core/tests/test_magic.py @@ -358,3 +358,9 @@ def test_timeit_shlex(): def test_timeit_arguments(): "Test valid timeit arguments, should not cause SyntaxError (GH #1269)" _ip.magic("timeit ('#')") + +@dec.skipif(_ip.magic_prun == _ip.profile_missing_notice) +def test_prun_quotes(): + "Test that prun does not clobber string escapes (GH #1302)" + _ip.magic("prun -q x = '\t'") + nt.assert_equal(_ip.user_ns['x'], '\t')