Merge pull request #204 from rocky/python-3.7-testing

Python 3.7 testing
This commit is contained in:
R. Bernstein
2019-01-12 11:57:48 -05:00
committed by GitHub
3 changed files with 11 additions and 7 deletions

View File

@@ -1,7 +1,5 @@
language: python language: python
sudo: false
python: python:
- '3.5' - '3.5'
- '2.7' - '2.7'
@@ -9,6 +7,11 @@ python:
- '3.4' - '3.4'
- '3.6' - '3.6'
matrix:
include:
- python: '3.7'
dist: xenial # required for Python >= 3.7 (travis-ci/travis-ci#9069)
install: install:
- pip install -e . - pip install -e .
- pip install -r requirements-dev.txt - pip install -r requirements-dev.txt

View File

@@ -115,7 +115,7 @@ if PYTHON_VERSION > 2.6:
return "f{}'{}'".format('r' if is_raw else '', content) return "f{}'{}'".format('r' if is_raw else '', content)
@pytest.mark.skipif(PYTHON_VERSION < 3.6, reason='need at least python 3.6') @pytest.mark.skipif(PYTHON_VERSION != 3.6, reason='need Python 3.6')
@hypothesis.given(format_specifiers()) @hypothesis.given(format_specifiers())
def test_format_specifiers(format_specifier): def test_format_specifiers(format_specifier):
"""Verify that format_specifiers generates valid specifiers""" """Verify that format_specifiers generates valid specifiers"""
@@ -137,14 +137,14 @@ if PYTHON_VERSION > 2.6:
assert 'dis(' + deparsed.text.strip('\n') + ')' == 'dis(' + expr.strip('\n') + ')' assert 'dis(' + deparsed.text.strip('\n') + ')' == 'dis(' + expr.strip('\n') + ')'
@pytest.mark.skipif(PYTHON_VERSION < 3.6, reason='need at least python 3.6') @pytest.mark.skipif(PYTHON_VERSION != 3.6, reason='need Python 3.6')
@hypothesis.given(fstrings()) @hypothesis.given(fstrings())
def test_uncompyle_fstring(fstring): def test_uncompyle_fstring(fstring):
"""Verify uncompyling fstring bytecode""" """Verify uncompyling fstring bytecode"""
run_test(fstring) run_test(fstring)
@pytest.mark.skipif(PYTHON_VERSION < 3.6, reason='need at least python 3.6') @pytest.mark.skipif(PYTHON_VERSION != 3.6, reason='need Python 3.6')
@pytest.mark.parametrize('fstring', [ @pytest.mark.parametrize('fstring', [
"f'{abc}{abc!s}'", "f'{abc}{abc!s}'",
"f'{abc}0'", "f'{abc}0'",

View File

@@ -90,7 +90,8 @@ check-bytecode-2:
check-bytecode-3: check-bytecode-3:
$(PYTHON) test_pythonlib.py --bytecode-3.0 \ $(PYTHON) test_pythonlib.py --bytecode-3.0 \
--bytecode-3.1 --bytecode-3.2 --bytecode-3.3 \ --bytecode-3.1 --bytecode-3.2 --bytecode-3.3 \
--bytecode-3.4 --bytecode-3.5 --bytecode-3.6 --bytecode-pypy3.2 --bytecode-3.4 --bytecode-3.5 --bytecode-3.6 --bytecode-3.7 \
--bytecode-pypy3.2
#: Check deparsing on selected bytecode 3.x #: Check deparsing on selected bytecode 3.x
check-bytecode-3-short: check-bytecode-3-short: