[Issue #19357] Ensure module "loaded" during tests gets forgotten.

This commit is contained in:
Eric Snow 2013-10-22 23:46:53 -06:00
commit 0db06a1c42
1 changed files with 1 additions and 1 deletions

View File

@ -24,7 +24,7 @@ class UseCache(unittest.TestCase):
def test_using_cache(self): def test_using_cache(self):
# [use cache] # [use cache]
module_to_use = "some module found!" module_to_use = "some module found!"
with util.uncache(module_to_use): with util.uncache('some_module'):
sys.modules['some_module'] = module_to_use sys.modules['some_module'] = module_to_use
module = import_util.import_('some_module') module = import_util.import_('some_module')
self.assertEqual(id(module_to_use), id(module)) self.assertEqual(id(module_to_use), id(module))