Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove \n from newline
  • Loading branch information
donbarbos committed Mar 15, 2025
commit 14b021174d524ccda699ae438b1247da200ad0ff
6 changes: 3 additions & 3 deletions Lib/test/test_tokenize.py
Original file line number Diff line number Diff line change
Expand Up @@ -3198,7 +3198,7 @@ def normalize_spaces(text):

def set_source(self, content):
with open(self.filename, 'w') as fp:
fp.write(content+'\n')
fp.write(content)

def invoke_tokenize(self, *flags):
output = StringIO()
Expand Down Expand Up @@ -3240,7 +3240,7 @@ def test_without_flag(self):
1,0-1,1: NAME 'a'
1,2-1,3: OP '='
1,4-1,5: NUMBER '1'
1,5-1,6: NEWLINE '\\n'
1,5-1,6: NEWLINE ''
2,0-2,0: ENDMARKER ''
'''
self.check_output(source, expect)
Expand All @@ -3253,7 +3253,7 @@ def test_exact_flag(self):
1,0-1,1: NAME 'a'
1,2-1,3: EQUAL '='
1,4-1,5: NUMBER '1'
1,5-1,6: NEWLINE '\\n'
1,5-1,6: NEWLINE ''
2,0-2,0: ENDMARKER ''
'''
for flag in ['-e', '--exact']:
Expand Down
Loading