453
453
InstrumentedImportReplacer.use_actions(self.actions)
455
458
original_import = __import__
456
459
def instrumented_import(mod, scope1, scope2, fromlist):
457
460
self.actions.append(('import', mod, fromlist))
458
461
return original_import(mod, scope1, scope2, fromlist)
463
463
__builtins__['__import__'] = original_import
466
465
__builtins__['__import__'] = instrumented_import
468
467
def create_modules(self):