Skip to content

Commit

Permalink
Fix tests with Python 3.9, closes PyCQA#549
Browse files Browse the repository at this point in the history
  • Loading branch information
sbraz committed Oct 2, 2020
1 parent 684edfc commit 6aa6ce3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pyflakes/test/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,8 +449,6 @@ def evaluate(source):
with self.makeTempFile(source) as sourcePath:
if PYPY:
message = 'end of file (EOF) while scanning triple-quoted string literal'
elif sys.version_info >= (3, 9):
message = 'invalid string prefix'
else:
message = 'invalid syntax'

Expand Down Expand Up @@ -517,6 +515,8 @@ def foo(bar=baz, bax):
if ERROR_HAS_LAST_LINE:
if PYPY:
column = 7
elif sys.version_info >= (3, 9):
column = 21
elif sys.version_info >= (3, 8):
column = 9
else:
Expand Down Expand Up @@ -545,6 +545,8 @@ def test_nonKeywordAfterKeywordSyntaxError(self):
if ERROR_HAS_LAST_LINE:
if PYPY:
column = 12
elif sys.version_info >= (3, 9):
column = 17
elif sys.version_info >= (3, 8):
column = 14
else:
Expand Down Expand Up @@ -579,6 +581,8 @@ def test_invalidEscape(self):
position_end = 1
if PYPY:
column = 5
elif ver >= (3, 9):
column = 13
else:
column = 7
# Column has been "fixed" since 3.2.4 and 3.3.1
Expand Down

0 comments on commit 6aa6ce3

Please sign in to comment.