Test '%reset out' magic
()
| 337 | nt.assert_not_in('a', _ip.user_ns) |
| 338 | |
| 339 | def test_reset_out(): |
| 340 | "Test '%reset out' magic" |
| 341 | _ip.run_cell("parrot = 'dead'", store_history=True) |
| 342 | # test '%reset -f out', make an Out prompt |
| 343 | _ip.run_cell("parrot", store_history=True) |
| 344 | nt.assert_true('dead' in [_ip.user_ns[x] for x in ('_','__','___')]) |
| 345 | _ip.magic('reset -f out') |
| 346 | nt.assert_false('dead' in [_ip.user_ns[x] for x in ('_','__','___')]) |
| 347 | nt.assert_equal(len(_ip.user_ns['Out']), 0) |
| 348 | |
| 349 | def test_reset_in(): |
| 350 | "Test '%reset in' magic" |