diff options
Diffstat (limited to 'Lib/test/test_import.py')
-rw-r--r-- | Lib/test/test_import.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/test/test_import.py b/Lib/test/test_import.py index a1cebf9..6cbd218 100644 --- a/Lib/test/test_import.py +++ b/Lib/test/test_import.py @@ -139,6 +139,15 @@ class ImportTests(unittest.TestCase): self.assertIs(orig_path, new_os.path) self.assertIsNot(orig_getenv, new_os.getenv) + def test_bug7732(self): + source = TESTFN + '.py' + os.mkdir(source) + try: + self.assertRaisesRegex(ImportError, '^No module', + imp.find_module, TESTFN, ["."]) + finally: + os.rmdir(source) + def test_module_with_large_stack(self, module='longlist'): # Regression test for http://bugs.python.org/issue561858. filename = module + '.py' |