##// END OF EJS Templates
Merge pull request #1306 from ivanov/fix1302...
Fernando Perez -
r5937:6bc0f536 merge
parent child Browse files
Show More
@@ -1391,12 +1391,10 b' Currently the magic system has the following functions:\\n"""'
1391 """
1391 """
1392
1392
1393 opts_def = Struct(D=[''],l=[],s=['time'],T=[''])
1393 opts_def = Struct(D=[''],l=[],s=['time'],T=[''])
1394 # protect user quote marks
1395 parameter_s = parameter_s.replace('"',r'\"').replace("'",r"\'")
1396
1394
1397 if user_mode: # regular user call
1395 if user_mode: # regular user call
1398 opts,arg_str = self.parse_options(parameter_s,'D:l:rs:T:q',
1396 opts,arg_str = self.parse_options(parameter_s,'D:l:rs:T:q',
1399 list_all=1)
1397 list_all=1, posix=False)
1400 namespace = self.shell.user_ns
1398 namespace = self.shell.user_ns
1401 else: # called to run a program by %run -p
1399 else: # called to run a program by %run -p
1402 try:
1400 try:
@@ -358,3 +358,9 b' def test_timeit_shlex():'
358 def test_timeit_arguments():
358 def test_timeit_arguments():
359 "Test valid timeit arguments, should not cause SyntaxError (GH #1269)"
359 "Test valid timeit arguments, should not cause SyntaxError (GH #1269)"
360 _ip.magic("timeit ('#')")
360 _ip.magic("timeit ('#')")
361
362 @dec.skipif(_ip.magic_prun == _ip.profile_missing_notice)
363 def test_prun_quotes():
364 "Test that prun does not clobber string escapes (GH #1302)"
365 _ip.magic("prun -q x = '\t'")
366 nt.assert_equal(_ip.user_ns['x'], '\t')
General Comments 0
You need to be logged in to leave comments. Login now