(self)
| 67 | # We also clear the linecache and zipimport cache |
| 68 | # just to avoid any bogus errors due to name reuse in the tests |
| 69 | def setUp(self): |
| 70 | linecache.clearcache() |
| 71 | zipimport._zip_directory_cache.clear() |
| 72 | self.path = sys.path[:] |
| 73 | self.meta_path = sys.meta_path[:] |
| 74 | self.path_hooks = sys.path_hooks[:] |
| 75 | sys.path_importer_cache.clear() |
| 76 | |
| 77 | def tearDown(self): |
| 78 | sys.path[:] = self.path |