diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 70cacf7b..44c27b70 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,7 +8,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: [3.5, 3.6, 3.7, 3.8, 3.9, 3.10-dev, pypy3] + python-version: [3.5, 3.6, 3.7, 3.8, 3.9, "3.10", pypy3] steps: - uses: actions/checkout@v2 diff --git a/NEWS b/NEWS index df49f5e8..cf7f84f0 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,15 @@ testtools NEWS Changes and improvements to testtools_, grouped by release. +NEXT +~~~~ + +Improvements +------------ + +* Add support for Python 3.10. + (Jürgen Gmach) + 2.5.0 ~~~~~ diff --git a/scripts/all-pythons b/scripts/all-pythons index 6996a447..0fbe0102 100755 --- a/scripts/all-pythons +++ b/scripts/all-pythons @@ -89,5 +89,5 @@ def now(): if __name__ == '__main__': sys.path.append(ROOT) result = TestProtocolClient(sys.stdout) - for version in '3.5 3.6 3.7 3.8 3.9'.split(): + for version in '3.5 3.6 3.7 3.8 3.9 3.10'.split(): run_for_python(version, result, sys.argv[1:]) diff --git a/setup.cfg b/setup.cfg index f252785b..c31f8f3c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -17,6 +17,7 @@ classifier = Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 + Programming Language :: Python :: 3.10 Programming Language :: Python :: 3 :: Only Programming Language :: Python :: Implementation :: CPython Programming Language :: Python :: Implementation :: PyPy diff --git a/testtools/tests/test_testresult.py b/testtools/tests/test_testresult.py index a9db0e27..4fbf15d1 100644 --- a/testtools/tests/test_testresult.py +++ b/testtools/tests/test_testresult.py @@ -2667,16 +2667,19 @@ def test_syntax_error(self): """Syntax errors should still have fancy special-case formatting""" if platform.python_implementation() == "PyPy": spaces = ' ' + marker = '^' elif sys.version_info >= (3, 10): spaces = ' ' + marker = '^^^' else: spaces = ' ' + marker = '^' textoutput = self._test_external_case("exec ('f(a, b c)')") self.assertIn(self._as_output( ' File "", line 1\n' ' f(a, b c)\n' + ' ' * self._error_on_character + - spaces + '^\n' + spaces + marker + '\n' 'SyntaxError: ' ), textoutput) diff --git a/tox.ini b/tox.ini index 5e9ab125..0416e06e 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py35,py36,py37,py38,py39,310,pypy3 +envlist = py35,py36,py37,py38,py39,py310,pypy3 minversion = 1.6 [testenv]