diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2010-03-17 13:52:48 (GMT) |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2010-03-17 13:52:48 (GMT) |
commit | d80b4bfd0b291d543c682d7dac0841de0192a238 (patch) | |
tree | 3968f81c285078b86b95aedddc6246f4d901a542 /Lib/test/test_importhooks.py | |
parent | 8b3f1ce5916c3ec5f426d45496b313d7be6ea3a1 (diff) | |
download | cpython-d80b4bfd0b291d543c682d7dac0841de0192a238.zip cpython-d80b4bfd0b291d543c682d7dac0841de0192a238.tar.gz cpython-d80b4bfd0b291d543c682d7dac0841de0192a238.tar.bz2 |
#7092: silence some more py3k warnings.
Diffstat (limited to 'Lib/test/test_importhooks.py')
-rw-r--r-- | Lib/test/test_importhooks.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Lib/test/test_importhooks.py b/Lib/test/test_importhooks.py index 7fd8c62..aa5dd8d 100644 --- a/Lib/test/test_importhooks.py +++ b/Lib/test/test_importhooks.py @@ -180,7 +180,7 @@ class ImportHooksTestCase(ImportHooksBaseTestCase): self.assertFalse(hasattr(reloadmodule,'reloaded')) TestImporter.modules['reloadmodule'] = (False, reload_co) - reload(reloadmodule) + imp.reload(reloadmodule) self.assertTrue(hasattr(reloadmodule,'reloaded')) import hooktestpackage.oldabs @@ -247,9 +247,10 @@ class ImportHooksTestCase(ImportHooksBaseTestCase): for n in sys.modules.keys(): if n.startswith(parent): del sys.modules[n] - for mname in mnames: - m = __import__(mname, globals(), locals(), ["__dummy__"]) - m.__loader__ # to make sure we actually handled the import + with test_support.check_py3k_warnings(): + for mname in mnames: + m = __import__(mname, globals(), locals(), ["__dummy__"]) + m.__loader__ # to make sure we actually handled the import def test_main(): |