Show More
@@ -111,12 +111,18 b' class TestMagicRunPass(tt.TempFileMixin):' | |||
|
111 | 111 | def setup(self): |
|
112 | 112 | """Make a valid python temp file.""" |
|
113 | 113 | self.mktmp('pass\n') |
|
114 | ||
|
114 | ||
|
115 | 115 | def run_tmpfile(self): |
|
116 | 116 | _ip = get_ipython() |
|
117 | 117 | # This fails on Windows if self.tmpfile.name has spaces or "~" in it. |
|
118 | 118 | # See below and ticket https://bugs.launchpad.net/bugs/366353 |
|
119 | 119 | _ip.magic('run %s' % self.fname) |
|
120 | ||
|
121 | def run_tmpfile_p(self): | |
|
122 | _ip = get_ipython() | |
|
123 | # This fails on Windows if self.tmpfile.name has spaces or "~" in it. | |
|
124 | # See below and ticket https://bugs.launchpad.net/bugs/366353 | |
|
125 | _ip.magic('run -p %s' % self.fname) | |
|
120 | 126 | |
|
121 | 127 | def test_builtins_id(self): |
|
122 | 128 | """Check that %run doesn't damage __builtins__ """ |
@@ -144,6 +150,12 b' class TestMagicRunPass(tt.TempFileMixin):' | |||
|
144 | 150 | _ip = get_ipython() |
|
145 | 151 | p2 = str(_ip.displayhook.prompt2).strip() |
|
146 | 152 | nt.assert_equals(p2[:3], '...') |
|
153 | ||
|
154 | def test_run_profile( self ): | |
|
155 | """Test that the option -p, which invokes the profiler, do not | |
|
156 | crash by invoking execfile""" | |
|
157 | _ip = get_ipython() | |
|
158 | self.run_tmpfile_p() | |
|
147 | 159 | |
|
148 | 160 | |
|
149 | 161 | class TestMagicRunSimple(tt.TempFileMixin): |
General Comments 0
You need to be logged in to leave comments.
Login now