diff options
author | Georg Brandl <georg@python.org> | 2006-09-30 09:03:45 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2006-09-30 09:03:45 (GMT) |
commit | 506cc189a97a468180ee18e4c4cd1b4e81242222 (patch) | |
tree | d89db2831faf617dba4844248d5cd75f6c40241d /Lib/test/test_exceptions.py | |
parent | af4337a0173d8ae9117b3c82c814ab2b9e635b35 (diff) | |
download | cpython-506cc189a97a468180ee18e4c4cd1b4e81242222.zip cpython-506cc189a97a468180ee18e4c4cd1b4e81242222.tar.gz cpython-506cc189a97a468180ee18e4c4cd1b4e81242222.tar.bz2 |
Bug #1566800: make sure that EnvironmentError can be called with any
number of arguments, as was the case in Python 2.4.
(backport from rev. 52061)
Diffstat (limited to 'Lib/test/test_exceptions.py')
-rw-r--r-- | Lib/test/test_exceptions.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/Lib/test/test_exceptions.py b/Lib/test/test_exceptions.py index 345569f..1d94046 100644 --- a/Lib/test/test_exceptions.py +++ b/Lib/test/test_exceptions.py @@ -196,11 +196,16 @@ class ExceptionTests(unittest.TestCase): (SystemExit, ('foo',), {'message' : 'foo', 'args' : ('foo',), 'code' : 'foo'}), (IOError, ('foo',), - {'message' : 'foo', 'args' : ('foo',)}), + {'message' : 'foo', 'args' : ('foo',), 'filename' : None, + 'errno' : None, 'strerror' : None}), (IOError, ('foo', 'bar'), - {'message' : '', 'args' : ('foo', 'bar')}), + {'message' : '', 'args' : ('foo', 'bar'), 'filename' : None, + 'errno' : 'foo', 'strerror' : 'bar'}), (IOError, ('foo', 'bar', 'baz'), - {'message' : '', 'args' : ('foo', 'bar')}), + {'message' : '', 'args' : ('foo', 'bar'), 'filename' : 'baz', + 'errno' : 'foo', 'strerror' : 'bar'}), + (IOError, ('foo', 'bar', 'baz', 'quux'), + {'message' : '', 'args' : ('foo', 'bar', 'baz', 'quux')}), (EnvironmentError, ('errnoStr', 'strErrorStr', 'filenameStr'), {'message' : '', 'args' : ('errnoStr', 'strErrorStr'), 'strerror' : 'strErrorStr', 'errno' : 'errnoStr', |