From bf77243207643bcd0c9ff9818dd17b301ccc7bcb 2010-01-16 03:10:59 From: Fernando Perez Date: 2010-01-16 03:10:59 Subject: [PATCH] Do not call %run with quotes, since on Windows quotes aren't stripped. On Posix, shlex strips quotes from filenames, but not on Windows. So if we call %run "somefilename" on Win32, we get a 'file not found' error. This problem was appearing for the test suite on win32. --- diff --git a/IPython/core/tests/test_run.py b/IPython/core/tests/test_run.py index b631785..79c167a 100644 --- a/IPython/core/tests/test_run.py +++ b/IPython/core/tests/test_run.py @@ -67,7 +67,7 @@ def doctest_run_builtins(): In [6]: t1 = type(__builtins__) - In [7]: %run "$fname" + In [7]: %run $fname In [7]: f.close() @@ -101,7 +101,7 @@ class TestMagicRunPass(tt.TempFileMixin): _ip = get_ipython() # This fails on Windows if self.tmpfile.name has spaces or "~" in it. # See below and ticket https://bugs.launchpad.net/bugs/366353 - _ip.magic('run "%s"' % self.fname) + _ip.magic('run %s' % self.fname) def test_builtins_id(self): """Check that %run doesn't damage __builtins__ """