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
Stop allowing failures on Python nightly.
  • Loading branch information
sbraz committed Oct 3, 2020
1 parent 684edfc commit d32c9c4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
7 changes: 1 addition & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,7 @@ matrix:
dist: xenial
- python: 3.8
dist: xenial
- python: nightly
dist: xenial
# TODO: https://bugs.python.org/issue40334
# the PEG parser is currently broken in some cases
allow_failures:
- python: nightly
- python: 3.9-dev
dist: xenial
install: pip install tox
script: tox -e py
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 d32c9c4

Please sign in to comment.