##// END OF EJS Templates
Add failing test for gh-3547
Thomas Kluyver -
Show More
@@ -263,6 +263,20 b' class TestMagicRunSimple(tt.TempFileMixin):'
263 _ip.magic('run %s' % self.fname)
263 _ip.magic('run %s' % self.fname)
264 _ip.run_cell('ip == get_ipython()')
264 _ip.run_cell('ip == get_ipython()')
265 nt.assert_equal(_ip.user_ns['i'], 5)
265 nt.assert_equal(_ip.user_ns['i'], 5)
266
267 def test_run_second(self):
268 """Test that running a second file doesn't clobber the first, gh-3547
269 """
270 self.mktmp("avar = 1\n"
271 "def afunc():\n"
272 " return avar\n")
273
274 empty = tt.TempFileMixin()
275 empty.mktmp("")
276
277 _ip.magic('run %s' % self.fname)
278 _ip.magic('run %s' % empty.fname)
279 nt.assert_equal(_ip.user_ns['afunc'](), 1)
266
280
267 @dec.skip_win32
281 @dec.skip_win32
268 def test_tclass(self):
282 def test_tclass(self):
General Comments 0
You need to be logged in to leave comments. Login now