]> granicus.if.org Git - python/commitdiff
reload(exceptions) should not raise an ImportError, but should act
authorBarry Warsaw <barry@python.org>
Mon, 13 Aug 2001 23:07:00 +0000 (23:07 +0000)
committerBarry Warsaw <barry@python.org>
Mon, 13 Aug 2001 23:07:00 +0000 (23:07 +0000)
just like reload(sys).  Test that this is so.  Closes SF bug #422004.

Lib/test/test_exceptions.py

index 9f42659adc527da6c026f52ae93da8c47a4567c2..dea88fee8b35cf0340e0fc740e5f7769d6beaf65 100644 (file)
@@ -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"