mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Issue #20517: Functions in the os module that accept two filenames
now register both filenames in the exception on failure. This required adding new C API functions allowing OSError exceptions to reference two filenames instead of one.
This commit is contained in:
parent
dc62b7e261
commit
b082731fbb
10 changed files with 380 additions and 73 deletions
|
@ -266,8 +266,8 @@ class ExceptionTests(unittest.TestCase):
|
|||
(OSError, ('foo', 'bar', 'baz'),
|
||||
{'args' : ('foo', 'bar'), 'filename' : 'baz',
|
||||
'errno' : 'foo', 'strerror' : 'bar'}),
|
||||
(OSError, ('foo', 'bar', 'baz', 'quux'),
|
||||
{'args' : ('foo', 'bar', 'baz', 'quux')}),
|
||||
(OSError, ('foo', 'bar', 'baz', None, 'quux'),
|
||||
{'args' : ('foo', 'bar'), 'filename' : 'baz', 'filename2': 'quux'}),
|
||||
(OSError, ('errnoStr', 'strErrorStr', 'filenameStr'),
|
||||
{'args' : ('errnoStr', 'strErrorStr'),
|
||||
'strerror' : 'strErrorStr', 'errno' : 'errnoStr',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue