File zope.exceptions-pr19+pr21-py310.patch of Package python3-zope.exceptions

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 1/2] 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(-)

Index: zope.exceptions-4.4/src/zope/exceptions/tests/test_exceptionformatter.py
===================================================================
--- zope.exceptions-4.4.orig/src/zope/exceptions/tests/test_exceptionformatter.py
+++ zope.exceptions-4.4/src/zope/exceptions/tests/test_exceptionformatter.py
@@ -666,9 +666,8 @@ class Test_format_exception(unittest.Tes
             s = self._callFUT(False)
         lines = s.splitlines()[-3:]
         self.assertEqual(lines[0], '    syntax error')
-        # PyPy has a shorter prefix
-        self.assertTrue(lines[1].endswith('    ^'))
-        self.assertEqual(lines[2], 'SyntaxError: invalid syntax')
+        self.assertIn('    ^', lines[1])
+        self.assertTrue(lines[2].startswith('SyntaxError: invalid syntax'), lines[2])
 
     def test_traceback_info_non_ascii(self):
         __traceback_info__ = u"Have a Snowman: \u2603"
openSUSE Build Service is sponsored by