Show More
@@ -294,18 +294,18 b' def test_reset_out():' | |||
|
294 | 294 | _ip.run_cell("parrot = 'dead'", store_history=True) |
|
295 | 295 | # test '%reset -f out', make an Out prompt |
|
296 | 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 | 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 | 300 | nt.assert_equal(len(_ip.user_ns['Out']), 0) |
|
301 | 301 | |
|
302 | 302 | def test_reset_in(): |
|
303 | 303 | "Test '%reset in' magic" |
|
304 | 304 | # test '%reset -f in' |
|
305 | 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 | 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 | 309 | nt.assert_equal(len(set(_ip.user_ns['In'])), 1) |
|
310 | 310 | |
|
311 | 311 | def test_reset_dhist(): |
General Comments 0
You need to be logged in to leave comments.
Login now