From ab4ad3fe9d348b9bc5d5a10a45775a119ad939ff Mon Sep 17 00:00:00 2001 From: Lukasz Langa Date: Sat, 26 Nov 2016 20:17:28 -0800 Subject: [PATCH] Make tests run with 3.6 --fast-parser, too --- .travis.yml | 2 +- tests/mypy_test.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index df515ff34..292bf2626 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,7 +10,7 @@ matrix: install: # pytype needs py-2.7, mypy needs py-3.2+. Additional logic in runtests.py - - if [[ $TRAVIS_PYTHON_VERSION == '3.5' ]]; then pip install -U git+git://github.com/python/mypy; fi + - 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 - if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then pip install -U git+git://github.com/google/pytype; fi script: diff --git a/tests/mypy_test.py b/tests/mypy_test.py index 90dd73752..3498059c4 100755 --- a/tests/mypy_test.py +++ b/tests/mypy_test.py @@ -83,7 +83,7 @@ def main(): print("Cannot import mypy. Did you install it?") sys.exit(1) - versions = [(3, 5), (3, 4), (3, 3), (3, 2), (2, 7)] + versions = [(3, 6), (3, 5), (3, 4), (3, 3), (3, 2), (2, 7)] if args.python_version: versions = [v for v in versions if any(('%d.%d' % v).startswith(av) for av in args.python_version)] @@ -124,7 +124,8 @@ def main(): runs += 1 flags = ['--python-version', '%d.%d' % (major, minor)] flags.append('--strict-optional') - ##flags.append('--fast-parser') # Travis CI doesn't have typed_ast yet. + if (major, minor) >= (3, 6): + flags.append('--fast-parser') ##flags.append('--warn-unused-ignores') # Fast parser and regular parser disagree. sys.argv = ['mypy'] + flags + files if args.verbose: