mirror of
https://github.com/python/cpython.git
synced 2025-08-26 11:45:20 +00:00
gh-51511: Note that codecs.open()'s encoding parameter affects automatic conversion to binary mode (GH-94370)
(cherry picked from commit d9407b174c
)
Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
This commit is contained in:
parent
68f25e261e
commit
c835b97c5f
3 changed files with 6 additions and 3 deletions
|
@ -709,7 +709,8 @@ class UTF16Test(ReadTest, unittest.TestCase):
|
|||
"spamspam", self.spambe)
|
||||
|
||||
def test_bug691291(self):
|
||||
# Files are always opened in binary mode, even if no binary mode was
|
||||
# If encoding is not None, then
|
||||
# files are always opened in binary mode, even if no binary mode was
|
||||
# specified. This means that no automatic conversion of '\n' is done
|
||||
# on reading and writing.
|
||||
s1 = 'Hello\r\nworld\r\n'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue