##// END OF EJS Templates
Add test for hard reset.
Thomas Kluyver -
Show More
@@ -379,6 +379,21 b' def test_xmode():'
379 379 for i in range(3):
380 380 _ip.magic("xmode")
381 381 nt.assert_equal(_ip.InteractiveTB.mode, xmode)
382
383 def test_reset_hard():
384 monitor = []
385 class A(object):
386 def __del__(self):
387 monitor.append(1)
388 def __repr__(self):
389 return "<A instance>"
390
391 _ip.user_ns["a"] = A()
392 _ip.run_cell("a")
393
394 nt.assert_equal(monitor, [])
395 _ip.magic_reset("-hf")
396 nt.assert_equal(monitor, [1])
382 397
383 398 def doctest_who():
384 399 """doctest for %who
General Comments 0
You need to be logged in to leave comments. Login now