mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
reload(exceptions) should not raise an ImportError, but should act
just like reload(sys). Test that this is so. Closes SF bug #422004.
This commit is contained in:
parent
928833891a
commit
b9c1d3dedf
1 changed files with 8 additions and 0 deletions
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue