MCPcopy Index your code
hub / github.com/ipython/ipython / teardown

Method teardown

IPython/testing/plugin/pytest_ipdoctest.py:333–343  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

331 self.dtest.globs = _ip.user_ns
332
333 def teardown(self) -> None:
334 from .ipdoctest import IPExample
335
336 # Undo the test.globs reassignment we made
337 if isinstance(self.dtest.examples[0], IPExample):
338 self.dtest.globs = {}
339 _ip.user_ns.clear()
340 _ip.user_ns.update(self._user_ns_orig)
341 del self._user_ns_orig
342
343 self.dtest.globs.clear()
344
345 def runtest(self) -> None:
346 assert self.dtest is not None

Callers

nothing calls this directly

Calls 1

updateMethod · 0.45

Tested by

no test coverage detected