diff options
author | Barry Warsaw <barry@python.org> | 2001-08-13 23:07:00 +0000 |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 2001-08-13 23:07:00 +0000 |
commit | 8ea1b33fdfbf27e3c44855f5d042dda1d60a7bf9 (patch) | |
tree | ee93ce3ae21416c31e1fc82839aeda7d258d9692 /Lib/test/test_exceptions.py | |
parent | df400f888f63ed9593b5c4e88e3db22b98f824fb (diff) | |
download | cpython-8ea1b33fdfbf27e3c44855f5d042dda1d60a7bf9.tar.gz |
reload(exceptions) should not raise an ImportError, but should act
just like reload(sys). Test that this is so. Closes SF bug #422004.
Diffstat (limited to 'Lib/test/test_exceptions.py')
-rw-r--r-- | Lib/test/test_exceptions.py | 8 |
1 files changed, 8 insertions, 0 deletions
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" |