Check that %run -i still works after %reset (gh-693)
(self)
| 313 | tt.ipexec_validate(self.fname, out, err) |
| 314 | |
| 315 | def test_run_i_after_reset(self): |
| 316 | """Check that %run -i still works after %reset (gh-693)""" |
| 317 | src = "yy = zz\n" |
| 318 | self.mktmp(src) |
| 319 | _ip.run_cell("zz = 23") |
| 320 | try: |
| 321 | _ip.magic('run -i %s' % self.fname) |
| 322 | nt.assert_equal(_ip.user_ns['yy'], 23) |
| 323 | finally: |
| 324 | _ip.magic('reset -f') |
| 325 | |
| 326 | _ip.run_cell("zz = 23") |
| 327 | try: |
| 328 | _ip.magic('run -i %s' % self.fname) |
| 329 | nt.assert_equal(_ip.user_ns['yy'], 23) |
| 330 | finally: |
| 331 | _ip.magic('reset -f') |
| 332 | |
| 333 | def test_unicode(self): |
| 334 | """Check that files in odd encodings are accepted.""" |