summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLouis Sautier <sautier.louis@gmail.com>2020-10-03 02:37:53 +0200
committerGitHub <noreply@github.com>2020-10-02 17:37:53 -0700
commit6a5f38b5ab12260fde8a0463acd433bc2d34dbcf (patch)
tree02daccc28f8a8a55e4409ae6be659b56a8b13627
parent684edfc8833bdb90b0a8ae562fd24d0e1e2fb686 (diff)
downloadpyflakes-6a5f38b5ab12260fde8a0463acd433bc2d34dbcf.tar.gz
Fix tests with Python 3.9, closes #549 (#586)
Stop allowing failures on Python nightly.
-rw-r--r--.travis.yml7
-rw-r--r--pyflakes/test/test_api.py8
2 files changed, 7 insertions, 8 deletions
diff --git a/.travis.yml b/.travis.yml
index 6abfdbb..cccc19c 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -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
diff --git a/pyflakes/test/test_api.py b/pyflakes/test/test_api.py
index 8e1e3c9..d379b3b 100644
--- a/pyflakes/test/test_api.py
+++ b/pyflakes/test/test_api.py
@@ -449,8 +449,6 @@ def baz():
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'
@@ -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:
@@ -545,6 +545,8 @@ foo(bar=baz, bax)
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:
@@ -579,6 +581,8 @@ foo(bar=baz, bax)
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