mirror of
https://github.com/python/cpython.git
synced 2025-10-06 15:11:58 +00:00
Get rig of EnvironmentError (#16705)
This commit is contained in:
parent
6eda46de99
commit
3438fa496d
16 changed files with 34 additions and 35 deletions
|
@ -255,11 +255,11 @@ class ExceptionTests(unittest.TestCase):
|
|||
'errno' : 'foo', 'strerror' : 'bar'}),
|
||||
(IOError, ('foo', 'bar', 'baz', 'quux'),
|
||||
{'args' : ('foo', 'bar', 'baz', 'quux')}),
|
||||
(EnvironmentError, ('errnoStr', 'strErrorStr', 'filenameStr'),
|
||||
(OSError, ('errnoStr', 'strErrorStr', 'filenameStr'),
|
||||
{'args' : ('errnoStr', 'strErrorStr'),
|
||||
'strerror' : 'strErrorStr', 'errno' : 'errnoStr',
|
||||
'filename' : 'filenameStr'}),
|
||||
(EnvironmentError, (1, 'strErrorStr', 'filenameStr'),
|
||||
(OSError, (1, 'strErrorStr', 'filenameStr'),
|
||||
{'args' : (1, 'strErrorStr'), 'errno' : 1,
|
||||
'strerror' : 'strErrorStr', 'filename' : 'filenameStr'}),
|
||||
(SyntaxError, (), {'msg' : None, 'text' : None,
|
||||
|
@ -409,7 +409,7 @@ class ExceptionTests(unittest.TestCase):
|
|||
self.assertIsNone(e.__context__)
|
||||
self.assertIsNone(e.__cause__)
|
||||
|
||||
class MyException(EnvironmentError):
|
||||
class MyException(OSError):
|
||||
pass
|
||||
|
||||
e = MyException()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue