You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-python/zope-exceptions/files/zope-exceptions-4.4-fix-tes...

24 lines
1.1 KiB

From 71be9d0724f087c99857edeef514d0b99e429cc9 Mon Sep 17 00:00:00 2001
From: Zamarin Arthur <arthurzam@gmail.com>
Date: Mon, 31 May 2021 12:14:30 +0300
Subject: [PATCH] Adapt to python 3.10 SyntaxError messages
Signed-off-by: Zamarin Arthur <arthurzam@gmail.com>
---
src/zope/exceptions/tests/test_exceptionformatter.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/zope/exceptions/tests/test_exceptionformatter.py b/src/zope/exceptions/tests/test_exceptionformatter.py
index 64729b1..0f5ee8c 100644
--- a/src/zope/exceptions/tests/test_exceptionformatter.py
+++ b/src/zope/exceptions/tests/test_exceptionformatter.py
@@ -668,7 +668,7 @@ def test_multiline_exception(self):
self.assertEqual(lines[0], ' syntax error')
# PyPy has a shorter prefix
self.assertTrue(lines[1].endswith(' ^'))
- self.assertEqual(lines[2], 'SyntaxError: invalid syntax')
+ self.assertRegex(lines[2], '^SyntaxError: invalid syntax')
def test_traceback_info_non_ascii(self):
__traceback_info__ = u"Have a Snowman: \u2603"