(self)
| 1414 | importlib.invalidate_caches() |
| 1415 | |
| 1416 | def tearDown(self): |
| 1417 | sys.path[:] = self.sys_path |
| 1418 | if self.orig_module is not None: |
| 1419 | sys.modules[self.module_name] = self.orig_module |
| 1420 | else: |
| 1421 | unload(self.module_name) |
| 1422 | unlink(self.file_name) |
| 1423 | if self.compiled_name: |
| 1424 | unlink(self.compiled_name) |
| 1425 | rmtree(self.dir_name) |
| 1426 | |
| 1427 | def import_module(self): |
| 1428 | ns = globals() |