Test the -e option to ignore sys.exit()
(self)
| 377 | _ip.magic('run -t -N 10 %s' % self.fname) |
| 378 | |
| 379 | def test_ignore_sys_exit(self): |
| 380 | """Test the -e option to ignore sys.exit()""" |
| 381 | src = "import sys; sys.exit(1)" |
| 382 | self.mktmp(src) |
| 383 | with tt.AssertPrints('SystemExit'): |
| 384 | _ip.magic('run %s' % self.fname) |
| 385 | |
| 386 | with tt.AssertNotPrints('SystemExit'): |
| 387 | _ip.magic('run -e %s' % self.fname) |
| 388 | |
| 389 | def test_run_nb(self): |
| 390 | """Test %run notebook.ipynb""" |