mirror of
https://github.com/python/cpython.git
synced 2025-09-15 05:06:12 +00:00
Bug #1566800: make sure that EnvironmentError can be called with any
number of arguments, as was the case in Python 2.4.
This commit is contained in:
parent
5d59c09834
commit
3267d28f9d
3 changed files with 12 additions and 4 deletions
|
@ -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',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue