gh-105259: Ensure we don't show newline characters for trailing NEWLINE tokens (#105364)

This commit is contained in:
Pablo Galindo Salgado 2023-06-06 13:52:16 +02:00 committed by GitHub
parent 0202aa002e
commit c0a6ed3934
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 17 additions and 5 deletions

View file

@ -1870,7 +1870,7 @@ class CTokenizeTest(TestCase):
TokenInfo(type=NUMBER, string='1', start=(1, 0), end=(1, 1), line='1+1\n'),
TokenInfo(type=OP, string='+', start=(1, 1), end=(1, 2), line='1+1\n'),
TokenInfo(type=NUMBER, string='1', start=(1, 2), end=(1, 3), line='1+1\n'),
TokenInfo(type=NEWLINE, string='\n', start=(1, 3), end=(1, 4), line='1+1\n'),
TokenInfo(type=NEWLINE, string='', start=(1, 3), end=(1, 4), line='1+1\n'),
TokenInfo(type=ENDMARKER, string='', start=(2, 0), end=(2, 0), line='')
]
for encoding in ["utf-8", "latin-1", "utf-16"]: