Skip to content

Test failures with PyPy3.9 #333

@mgorny

Description

@mgorny

With PyPy3.9 7.3.9, the following tests are failing:

Tests running...
======================================================================
FAIL: testtools.tests.test_testresult.TestNonAsciiResults.test_syntax_error
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/testtools/testtools/tests/test_testresult.py", line 2678, in test_syntax_error
    self.assertIn(self._as_output(
  File "/tmp/testtools/testtools/testcase.py", line 399, in assertIn
    self.assertThat(haystack, Contains(needle), message)
  File "/tmp/testtools/testtools/testcase.py", line 480, in assertThat
    raise mismatch_error
testtools.matchers._impl.MismatchError: '  File "<string>", line 1\n    f(a, b c)\n           ^\nSyntaxError: ' not in 'Tests running...\n======================================================================\nERROR: test_syntax_error.Test.runTest\n----------------------------------------------------------------------\nTraceback (most recent call last):\n  File "/tmp/TestNonAsciiResultsdm0yfepy/test_syntax_error.py", line 6, in runTest\n    exec (\'f(a, b c)\')\n  File "<string>", line 1\n    f(a, b c)\n         ^\nSyntaxError: invalid syntax. Perhaps you forgot a comma?\n\nRan 1 test in 0.001s\nFAILED (failures=1)\n'
======================================================================
FAIL: testtools.tests.test_testresult.TestNonAsciiResultsWithUnittest.test_syntax_error
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/testtools/testtools/tests/test_testresult.py", line 2678, in test_syntax_error
    self.assertIn(self._as_output(
  File "/tmp/testtools/testtools/testcase.py", line 399, in assertIn
    self.assertThat(haystack, Contains(needle), message)
  File "/tmp/testtools/testtools/testcase.py", line 480, in assertThat
    raise mismatch_error
testtools.matchers._impl.MismatchError: '  File "<string>", line 1\n    f(a, b c)\n           ^\nSyntaxError: ' not in 'E\n======================================================================\nERROR: runTest (test_syntax_error.Test)\ntest_syntax_error.Test.runTest\n----------------------------------------------------------------------\ntesttools.testresult.real._StringException: Traceback (most recent call last):\n  File "/tmp/TestNonAsciiResultsWithUnittestzy0f2shc/test_syntax_error.py", line 6, in runTest\n    exec (\'f(a, b c)\')\n  File "<string>", line 1\n    f(a, b c)\n         ^\nSyntaxError: invalid syntax. Perhaps you forgot a comma?\n\n\n----------------------------------------------------------------------\nRan 1 test in 0.001s\n\nFAILED (errors=1)\n'

Ran 2627 tests in 2.930s
FAILED (failures=2)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions