Skip to content

Commit

Permalink
Fix pypy tests in test_testresult.py (#358)
Browse files Browse the repository at this point in the history
* GitHub Actions: Test both pypy3.9 and pypy3.10

* test_testresult.py: Two spaces less

* marker = '^^^' if sys.version_info >= (3, 10) else '^'
  • Loading branch information
cclauss committed Oct 18, 2023
1 parent e3c9ed6 commit aedd0cb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.6, 3.7, 3.8, 3.9, "3.10", 3.11, 3.12, pypy3.10]
python-version: [3.6, 3.7, 3.8, 3.9, "3.10", 3.11, 3.12, pypy3.9, pypy3.10]

steps:
- uses: actions/checkout@v4
Expand Down
6 changes: 2 additions & 4 deletions testtools/tests/test_testresult.py
Original file line number Diff line number Diff line change
Expand Up @@ -2668,14 +2668,12 @@ def test_non_ascii_dirname(self):
def test_syntax_error(self):
"""Syntax errors should still have fancy special-case formatting"""
if platform.python_implementation() == "PyPy":
spaces = ' '
marker = '^'
spaces = ' '
elif sys.version_info >= (3, 10):
spaces = ' '
marker = '^^^'
else:
spaces = ' '
marker = '^'
marker = '^^^' if sys.version_info >= (3, 10) else '^'
textoutput = self._test_external_case("exec ('f(a, b c)')")
self.assertIn(self._as_output(
' File "<string>", line 1\n'
Expand Down

0 comments on commit aedd0cb

Please sign in to comment.