MCPcopy Index your code
hub / github.com/python/cpython / rollbackImports

Method rollbackImports

Tools/unittestgui/unittestgui.py:195–199  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

193 self.previousModules = sys.modules.copy()
194
195 def rollbackImports(self):
196 for modname in sys.modules.copy().keys():
197 if not modname in self.previousModules:
198 # Force reload when modname next imported
199 del(sys.modules[modname])
200
201
202##############################################################################

Callers 1

discoverClickedMethod · 0.80

Calls 2

keysMethod · 0.45
copyMethod · 0.45

Tested by

no test coverage detected