mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
gh-69528: Distinguish between file modes "wb+" and "rb+" (GH-137834)
Co-authored-by: Xiang Zhang <angwerzx@126.com>
This commit is contained in:
parent
60df1d7e0c
commit
02c1abfc54
7 changed files with 27 additions and 10 deletions
|
|
@ -567,8 +567,8 @@ def testModeStrings(self):
|
|||
# test that the mode attribute is correct for various mode strings
|
||||
# given as init args
|
||||
try:
|
||||
for modes in [('w', 'wb'), ('wb', 'wb'), ('wb+', 'rb+'),
|
||||
('w+b', 'rb+'), ('a', 'ab'), ('ab', 'ab'),
|
||||
for modes in [('w', 'wb'), ('wb', 'wb'), ('wb+', 'wb+'),
|
||||
('w+b', 'wb+'), ('a', 'ab'), ('ab', 'ab'),
|
||||
('ab+', 'ab+'), ('a+b', 'ab+'), ('r', 'rb'),
|
||||
('rb', 'rb'), ('rb+', 'rb+'), ('r+b', 'rb+')]:
|
||||
# read modes are last so that TESTFN will exist first
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue