GH-90344: replace single-call io.IncrementalNewlineDecoder usage with non-incremental newline decoders (GH-30276)

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Brett Cannon <brett@python.org>
This commit is contained in:
Guo Ci 2025-11-14 19:13:37 -05:00 committed by GitHub
parent f0a8bc737a
commit 453d886f85
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 5 additions and 10 deletions

View file

@ -904,7 +904,7 @@ def test_universal_newlines(self):
mock = self.SourceOnlyLoaderMock('mod.file')
source = "x = 42\r\ny = -13\r\n"
mock.source = source.encode('utf-8')
expect = io.IncrementalNewlineDecoder(None, True).decode(source)
expect = io.StringIO(source, newline=None).getvalue()
self.assertEqual(mock.get_source(name), expect)