Skip to content

Commit 6a5f38b

Browse files
authored
Fix tests with Python 3.9, closes #549 (#586)
Stop allowing failures on Python nightly.
1 parent 684edfc commit 6a5f38b

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

.travis.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,7 @@ matrix:
1212
dist: xenial
1313
- python: 3.8
1414
dist: xenial
15-
- python: nightly
16-
dist: xenial
17-
# TODO: https://bugs.python.org/issue40334
18-
# the PEG parser is currently broken in some cases
19-
allow_failures:
20-
- python: nightly
15+
- python: 3.9-dev
2116
dist: xenial
2217
install: pip install tox
2318
script: tox -e py

pyflakes/test/test_api.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -449,8 +449,6 @@ def evaluate(source):
449449
with self.makeTempFile(source) as sourcePath:
450450
if PYPY:
451451
message = 'end of file (EOF) while scanning triple-quoted string literal'
452-
elif sys.version_info >= (3, 9):
453-
message = 'invalid string prefix'
454452
else:
455453
message = 'invalid syntax'
456454

@@ -517,6 +515,8 @@ def foo(bar=baz, bax):
517515
if ERROR_HAS_LAST_LINE:
518516
if PYPY:
519517
column = 7
518+
elif sys.version_info >= (3, 9):
519+
column = 21
520520
elif sys.version_info >= (3, 8):
521521
column = 9
522522
else:
@@ -545,6 +545,8 @@ def test_nonKeywordAfterKeywordSyntaxError(self):
545545
if ERROR_HAS_LAST_LINE:
546546
if PYPY:
547547
column = 12
548+
elif sys.version_info >= (3, 9):
549+
column = 17
548550
elif sys.version_info >= (3, 8):
549551
column = 14
550552
else:
@@ -579,6 +581,8 @@ def test_invalidEscape(self):
579581
position_end = 1
580582
if PYPY:
581583
column = 5
584+
elif ver >= (3, 9):
585+
column = 13
582586
else:
583587
column = 7
584588
# Column has been "fixed" since 3.2.4 and 3.3.1

0 commit comments

Comments
 (0)