Files
gentoo/dev-python/zope-exceptions/files/zope-exceptions-5.1-py313.patch
Michał Górny 2d5675d346 dev-python/zope-exceptions: Enable py3.13
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2024-06-18 17:56:13 +02:00

25 lines
1.0 KiB
Diff

diff --git a/src/zope/exceptions/tests/test_exceptionformatter.py b/src/zope/exceptions/tests/test_exceptionformatter.py
index 92ea79a..0e18d8d 100644
--- a/src/zope/exceptions/tests/test_exceptionformatter.py
+++ b/src/zope/exceptions/tests/test_exceptionformatter.py
@@ -24,6 +24,7 @@ from urllib.error import HTTPError
IS_PY39_OR_GREATER = sys.version_info >= (3, 9)
+IS_PY313_OR_GREATER = sys.version_info >= (3, 13)
class TextExceptionFormatterTests(unittest.TestCase):
@@ -763,8 +764,10 @@ class Test_format_exception(unittest.TestCase):
</ul><p> File "&lt;string&gt;", line 1<br />
import<br />
^<br />
- SyntaxError: invalid syntax<br />
+ SyntaxError: {error}<br />
</p>""").format(
+ error="Expected one or more names after 'import'"
+ if IS_PY313_OR_GREATER else 'invalid syntax',
module='zope.exceptions.tests.test_exceptionformatter',
fn='test_format_exception_as_html',
)