Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b9c1d3d

Browse files
committed
reload(exceptions) should not raise an ImportError, but should act
just like reload(sys). Test that this is so. Closes SF bug #422004.
1 parent 9288338 commit b9c1d3d

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

Lib/test/test_exceptions.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@
66
print '5. Built-in exceptions'
77
# XXX This is not really enough, each *operation* should be tested!
88

9+
# Reloading the built-in exceptions module failed prior to Py2.2, while it
10+
# should act the same as reloading built-in sys.
11+
try:
12+
import exceptions
13+
reload(exceptions)
14+
except ImportError, e:
15+
raise TestFailed, e
16+
917
def test_raise_catch(exc):
1018
try:
1119
raise exc, "spam"

0 commit comments

Comments
 (0)