diff options
Diffstat (limited to 'Lib/test/test_import.py')
-rw-r--r-- | Lib/test/test_import.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/test/test_import.py b/Lib/test/test_import.py index a8f912f..87907c8 100644 --- a/Lib/test/test_import.py +++ b/Lib/test/test_import.py @@ -193,6 +193,16 @@ class ImportTest(unittest.TestCase): if TESTFN in sys.modules: del sys.modules[TESTFN] + def test_infinite_reload(self): + # Bug #742342 reports that Python segfaults (infinite recursion in C) + # when faced with self-recursive reload()ing. + + sys.path.insert(0, os.path.dirname(__file__)) + try: + import infinite_reload + finally: + sys.path.pop(0) + def test_import_name_binding(self): # import x.y.z binds x in the current namespace import test as x |