blob: a218797b25a2c87d98ad34bf070a45efb4bc7950 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
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"
|