From: Barry Warsaw Date: Mon, 13 Aug 2001 23:07:00 +0000 (+0000) Subject: reload(exceptions) should not raise an ImportError, but should act X-Git-Tag: v2.2a3~573 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b9c1d3dedf73b702167b6a59d2d8fa2f96ee041f;p=python reload(exceptions) should not raise an ImportError, but should act just like reload(sys). Test that this is so. Closes SF bug #422004. --- diff --git a/Lib/test/test_exceptions.py b/Lib/test/test_exceptions.py index 9f42659adc..dea88fee8b 100644 --- a/Lib/test/test_exceptions.py +++ b/Lib/test/test_exceptions.py @@ -6,6 +6,14 @@ from types import ClassType print '5. Built-in exceptions' # XXX This is not really enough, each *operation* should be tested! +# Reloading the built-in exceptions module failed prior to Py2.2, while it +# should act the same as reloading built-in sys. +try: + import exceptions + reload(exceptions) +except ImportError, e: + raise TestFailed, e + def test_raise_catch(exc): try: raise exc, "spam"