Port to Python 3.

This commit is contained in:
Itamar Turner-Trauring 2021-05-11 11:13:52 -04:00
parent 9baedc97db
commit b8b00fa2da
3 changed files with 11 additions and 3 deletions

View File

@ -1,3 +1,6 @@
"""
Ported to Python 3.
"""
from __future__ import ( from __future__ import (
print_function, print_function,
unicode_literals, unicode_literals,
@ -5,6 +8,10 @@ from __future__ import (
division, division,
) )
from future.utils import PY2
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 six import ensure_text from six import ensure_text
import json import json

View File

@ -18,12 +18,13 @@ if PY2:
# Every time a module is added here, also add it to tox.ini environment # 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 # integrations3. Bit of duplication, but it's only a handful of files and quite
# temporary. # temporary, just until we've ported them all.
PORTED_INTEGRATION_TESTS = [ PORTED_INTEGRATION_TESTS = [
"integration.test_aaa_aardvark", "integration.test_aaa_aardvark",
"integration.test_servers_of_happiness", "integration.test_servers_of_happiness",
"integration.test_sftp", "integration.test_sftp",
"integration.test_streaming_logs",
] ]

View File

@ -102,7 +102,7 @@ setenv =
COVERAGE_PROCESS_START=.coveragerc COVERAGE_PROCESS_START=.coveragerc
commands = commands =
# NOTE: 'run with "py.test --keep-tempdir -s -v integration/" to debug failures' # NOTE: 'run with "py.test --keep-tempdir -s -v integration/" to debug failures'
python3 -b -m pytest --timeout=1800 --coverage -v {posargs:integration/test_aaa_aardvark.py integration/test_servers_of_happiness.py integration/test_sftp.py} python3 -b -m pytest --timeout=1800 --coverage -v {posargs:integration/test_aaa_aardvark.py integration/test_servers_of_happiness.py integration/test_sftp.py integration/test_streaming_logs.py}
coverage combine coverage combine
coverage report coverage report