MCPcopy Create free account
hub / github.com/ipython/ipython / test_reset_hard

Function test_reset_hard

IPython/core/tests/test_magic.py:538–551  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

536 nt.assert_equal(_ip.InteractiveTB.mode, xmode)
537
538def test_reset_hard():
539 monitor = []
540 class A(object):
541 def __del__(self):
542 monitor.append(1)
543 def __repr__(self):
544 return "<A instance>"
545
546 _ip.user_ns["a"] = A()
547 _ip.run_cell("a")
548
549 nt.assert_equal(monitor, [])
550 _ip.magic("reset -f")
551 nt.assert_equal(monitor, [1])
552
553class TestXdel(tt.TempFileMixin):
554 def test_xdel(self):

Callers

nothing calls this directly

Calls 3

AClass · 0.70
run_cellMethod · 0.45
magicMethod · 0.45

Tested by

no test coverage detected