Show More
@@ -294,18 +294,18 b' def test_reset_out():' | |||||
294 | _ip.run_cell("parrot = 'dead'", store_history=True) |
|
294 | _ip.run_cell("parrot = 'dead'", store_history=True) | |
295 | # test '%reset -f out', make an Out prompt |
|
295 | # test '%reset -f out', make an Out prompt | |
296 | _ip.run_cell("parrot", store_history=True) |
|
296 | _ip.run_cell("parrot", store_history=True) | |
297 | nt.assert_true('dead' in [_ip.user_ns[x] for x in '_','__','___']) |
|
297 | nt.assert_true('dead' in [_ip.user_ns[x] for x in ('_','__','___')]) | |
298 | _ip.magic('reset -f out') |
|
298 | _ip.magic('reset -f out') | |
299 | nt.assert_false('dead' in [_ip.user_ns[x] for x in '_','__','___']) |
|
299 | nt.assert_false('dead' in [_ip.user_ns[x] for x in ('_','__','___')]) | |
300 | nt.assert_equal(len(_ip.user_ns['Out']), 0) |
|
300 | nt.assert_equal(len(_ip.user_ns['Out']), 0) | |
301 |
|
301 | |||
302 | def test_reset_in(): |
|
302 | def test_reset_in(): | |
303 | "Test '%reset in' magic" |
|
303 | "Test '%reset in' magic" | |
304 | # test '%reset -f in' |
|
304 | # test '%reset -f in' | |
305 | _ip.run_cell("parrot", store_history=True) |
|
305 | _ip.run_cell("parrot", store_history=True) | |
306 | nt.assert_true('parrot' in [_ip.user_ns[x] for x in '_i','_ii','_iii']) |
|
306 | nt.assert_true('parrot' in [_ip.user_ns[x] for x in ('_i','_ii','_iii')]) | |
307 | _ip.magic('%reset -f in') |
|
307 | _ip.magic('%reset -f in') | |
308 | nt.assert_false('parrot' in [_ip.user_ns[x] for x in '_i','_ii','_iii']) |
|
308 | nt.assert_false('parrot' in [_ip.user_ns[x] for x in ('_i','_ii','_iii')]) | |
309 | nt.assert_equal(len(set(_ip.user_ns['In'])), 1) |
|
309 | nt.assert_equal(len(set(_ip.user_ns['In'])), 1) | |
310 |
|
310 | |||
311 | def test_reset_dhist(): |
|
311 | def test_reset_dhist(): |
General Comments 0
You need to be logged in to leave comments.
Login now