First pass at integration support on Python 3.

This commit is contained in:
Itamar Turner-Trauring 2021-05-07 13:42:38 -04:00
parent 04fc8e7046
commit add20d8024
2 changed files with 15 additions and 1 deletions

View File

@ -23,6 +23,9 @@ if PY2:
from future.builtins import filter, map, zip, ascii, chr, hex, input, next, oct, open, pow, round, super, bytes, dict, list, object, range, str, max, min # noqa: F401 from future.builtins import filter, map, zip, ascii, chr, hex, input, next, oct, open, pow, round, super, bytes, dict, list, object, range, str, max, min # noqa: F401
# Every time a module is added here, also add it to tox.ini environment
# integrations3. Bit of duplication, but it's only a handful of files so quite
# temporary.
PORTED_INTEGRATION_TESTS = [ PORTED_INTEGRATION_TESTS = [
"integration.test_servers_of_happiness", "integration.test_servers_of_happiness",
] ]

13
tox.ini
View File

@ -7,7 +7,7 @@
[gh-actions] [gh-actions]
python = python =
2.7: py27-coverage,codechecks 2.7: py27-coverage,codechecks
3.6: py36-coverage 3.6: py36-coverage,integration3
3.7: py37-coverage 3.7: py37-coverage
3.8: py38-coverage 3.8: py38-coverage
3.9: py39-coverage,typechecks,codechecks3 3.9: py39-coverage,typechecks,codechecks3
@ -97,6 +97,17 @@ commands =
coverage report coverage report
[testenv:integration3]
basepython = python3
setenv =
COVERAGE_PROCESS_START=.coveragerc
commands =
# NOTE: 'run with "py.test --keep-tempdir -s -v integration/" to debug failures'
py.test --timeout=1800 --coverage -v {posargs:integration/test_servers_of_happiness.py}
coverage combine
coverage report
[testenv:codechecks] [testenv:codechecks]
basepython = python2.7 basepython = python2.7
# On macOS, git inside of towncrier needs $HOME. # On macOS, git inside of towncrier needs $HOME.