From 059be065e28551d4b029c8d525fafdaea3df4a3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Tue, 18 Feb 2025 11:10:21 +0100 Subject: [PATCH 1/2] test: Fix expected exception message for PyPy3.11 Fix the regex in `test_parser.py::PythonParserTest::test_not_python` to account for the possibility of code being wrapped in double quotes rather than single quotes, to fix the test on PyPy3.11. --- tests/test_parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_parser.py b/tests/test_parser.py index 2ab30853e..a9a247ffd 100644 --- a/tests/test_parser.py +++ b/tests/test_parser.py @@ -123,7 +123,7 @@ def foo(): ) ]) def test_not_python(self, text: str) -> None: - msg = r"Couldn't parse '' as Python source: '.*' at line \d+" + msg = r"Couldn't parse '' as Python source: ['\"].*['\"] at line \d+" with pytest.raises(NotPython, match=msg): _ = self.parse_text(text) From dc5f854ea889a93c2a55e12d7464ded35142b37c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Tue, 18 Feb 2025 11:14:00 +0100 Subject: [PATCH 2/2] test: Skip CTracer tests on pypy311 too --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index ccc9e702f..8cf006b7c 100644 --- a/tox.ini +++ b/tox.ini @@ -26,7 +26,7 @@ install_command = python -m pip install -U {opts} {packages} passenv = * setenv = - pypy3{,9,10}: COVERAGE_TEST_CORES=pytrace + pypy3{,9,10,11}: COVERAGE_TEST_CORES=pytrace # For some tests, we need .pyc files written in the current directory, # so override any local setting. PYTHONPYCACHEPREFIX=