Skip to content

Commit 42b21e7

Browse files
authored
Merge pull request #304 from CyrilRoelandteNovance/fix-python310
Fix tests with Python 3.10
2 parents f6cc225 + 1421285 commit 42b21e7

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
strategy:
99
fail-fast: false
1010
matrix:
11-
python-version: [3.5, 3.6, 3.7, 3.8, 3.9, pypy3]
11+
python-version: [3.5, 3.6, 3.7, 3.8, 3.9, 3.10-dev, pypy3]
1212

1313
steps:
1414
- uses: actions/checkout@v2

testtools/tests/test_testresult.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2667,6 +2667,8 @@ def test_syntax_error(self):
26672667
"""Syntax errors should still have fancy special-case formatting"""
26682668
if platform.python_implementation() == "PyPy":
26692669
spaces = ' '
2670+
elif sys.version_info >= (3, 10):
2671+
spaces = ' '
26702672
else:
26712673
spaces = ' '
26722674
textoutput = self._test_external_case("exec ('f(a, b c)')")

testtools/tests/test_testsuite.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ def run(self):
181181
test.run(process_result)
182182
""", doctest.ELLIPSIS))
183183
self.assertThat(events[3][6].decode('utf8'), DocTestMatches("""\
184-
TypeError: run() takes ...1 ...argument...2...given...
184+
TypeError: ...run() takes ...1 ...argument...2...given...
185185
""", doctest.ELLIPSIS))
186186
events = [event[0:10] + (None,) for event in events]
187187
events[1] = events[1][:6] + (None,) + events[1][7:]

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py35,py36,py37,py38,py39,pypy3
2+
envlist = py35,py36,py37,py38,py39,310,pypy3
33
minversion = 1.6
44

55
[testenv]

0 commit comments

Comments
 (0)