From 1a0d94e82319a45017c623b76d177d22b57f2e1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hrn=C4=8Diar?= Date: Mon, 24 Jan 2022 09:11:57 +0100 Subject: Adapt tests for Python 3.11 Fix broken tests, Python 3.11 brings in enhanced error locations in tracebacks. --- c/test_c.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'c') diff --git a/c/test_c.py b/c/test_c.py index 654584d..e23c7fe 100644 --- a/c/test_c.py +++ b/c/test_c.py @@ -1384,8 +1384,10 @@ Exception ignored from cffi callback : Traceback (most recent call last): File "$", line $, in Zcb1 $ + $ File "$", line $, in check_value $ + $ ValueError: 42 """) sys.stderr = cStringIO.StringIO() @@ -1400,6 +1402,7 @@ Exception ignored from cffi callback , trying to convert t Traceback (most recent call last): File "$", line $, in test_callback_exception $ + $ OverflowError: integer 60000 does not fit 'short' """) sys.stderr = cStringIO.StringIO() @@ -1443,11 +1446,13 @@ Exception ignored from cffi callback , trying to convert t Traceback (most recent call last): File "$", line $, in test_callback_exception $ + $ OverflowError: integer 60000 does not fit 'short' Exception ignored during handling of the above exception by 'onerror': Traceback (most recent call last): File "$", line $, in test_callback_exception $ + $ TypeError: $integer$ """) # @@ -1472,11 +1477,13 @@ Exception ignored from cffi callback , trying to convert t Traceback (most recent call last): File "$", line $, in test_callback_exception $ + $ OverflowError: integer 60000 does not fit 'short' Exception ignored during handling of the above exception by 'onerror': Traceback (most recent call last): File "$", line $, in oops $ + $ AttributeError: 'str' object has no attribute 'append$ """) finally: -- cgit v1.2.1