Skip to content

Commit ab4ad3f

Browse files
author
Lukasz Langa
committed
Make tests run with 3.6 --fast-parser, too
1 parent eb90edd commit ab4ad3f

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ matrix:
1010

1111
install:
1212
# pytype needs py-2.7, mypy needs py-3.2+. Additional logic in runtests.py
13-
- if [[ $TRAVIS_PYTHON_VERSION == '3.5' ]]; then pip install -U git+git://github.com/python/mypy; fi
13+
- if [[ $TRAVIS_PYTHON_VERSION == '3.5' ]]; then pip install -U git+git://github.com/python/mypy && pip install -U git+git://github.com/dropbox/typed_ast; fi
1414
- if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then pip install -U git+git://github.com/google/pytype; fi
1515

1616
script:

tests/mypy_test.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def main():
8383
print("Cannot import mypy. Did you install it?")
8484
sys.exit(1)
8585

86-
versions = [(3, 5), (3, 4), (3, 3), (3, 2), (2, 7)]
86+
versions = [(3, 6), (3, 5), (3, 4), (3, 3), (3, 2), (2, 7)]
8787
if args.python_version:
8888
versions = [v for v in versions
8989
if any(('%d.%d' % v).startswith(av) for av in args.python_version)]
@@ -124,7 +124,8 @@ def main():
124124
runs += 1
125125
flags = ['--python-version', '%d.%d' % (major, minor)]
126126
flags.append('--strict-optional')
127-
##flags.append('--fast-parser') # Travis CI doesn't have typed_ast yet.
127+
if (major, minor) >= (3, 6):
128+
flags.append('--fast-parser')
128129
##flags.append('--warn-unused-ignores') # Fast parser and regular parser disagree.
129130
sys.argv = ['mypy'] + flags + files
130131
if args.verbose:

0 commit comments

Comments
 (0)