##// END OF EJS Templates
Add test for hard reset.
Thomas Kluyver -
Show More
@@ -380,6 +380,21 b' def test_xmode():'
380 _ip.magic("xmode")
380 _ip.magic("xmode")
381 nt.assert_equal(_ip.InteractiveTB.mode, xmode)
381 nt.assert_equal(_ip.InteractiveTB.mode, xmode)
382
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])
397
383 def doctest_who():
398 def doctest_who():
384 """doctest for %who
399 """doctest for %who
385
400
General Comments 0
You need to be logged in to leave comments. Login now