Skip to content

Commit 94ccd29

Browse files
committed
Correct source and expect newline
1 parent 969a537 commit 94ccd29

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Lib/test/test_tokenize.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3198,7 +3198,7 @@ def normalize_spaces(text):
31983198

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

32033203
def invoke_tokenize(self, *flags):
32043204
output = StringIO()
@@ -3234,7 +3234,7 @@ def f():
32343234

32353235
def test_without_flag(self):
32363236
# test 'python -m tokenize source.py'
3237-
source = 'a = 1\n'
3237+
source = 'a = 1'
32383238
expect = '''
32393239
0,0-0,0: ENCODING 'utf-8'
32403240
1,0-1,1: NAME 'a'
@@ -3247,7 +3247,7 @@ def test_without_flag(self):
32473247

32483248
def test_exact_flag(self):
32493249
# test 'python -m tokenize -e/--exact source.py'
3250-
source = 'a = 1\n'
3250+
source = 'a = 1'
32513251
expect = '''
32523252
0,0-0,0: ENCODING 'utf-8'
32533253
1,0-1,1: NAME 'a'

0 commit comments

Comments
 (0)