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
Correct source and expect newline
  • Loading branch information
donbarbos committed Mar 15, 2025
commit 94ccd299b110acc6f2cd5db83e8a25123d0f6f05
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)
fp.write(content+'\n')

def invoke_tokenize(self, *flags):
output = StringIO()
Expand Down Expand Up @@ -3234,7 +3234,7 @@ def f():

def test_without_flag(self):
# test 'python -m tokenize source.py'
source = 'a = 1\n'
source = 'a = 1'
expect = '''
0,0-0,0: ENCODING 'utf-8'
1,0-1,1: NAME 'a'
Expand All @@ -3247,7 +3247,7 @@ def test_without_flag(self):

def test_exact_flag(self):
# test 'python -m tokenize -e/--exact source.py'
source = 'a = 1\n'
source = 'a = 1'
Comment thread
picnixz marked this conversation as resolved.
expect = '''
0,0-0,0: ENCODING 'utf-8'
1,0-1,1: NAME 'a'
Expand Down