summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomáš Hrnčiar <tomas.hrnciar@me.com>2022-01-24 09:11:57 +0100
committerTomáš Hrnčiar <tomas.hrnciar@me.com>2022-01-24 09:11:57 +0100
commit1a0d94e82319a45017c623b76d177d22b57f2e1d (patch)
treeb35e0f80e4efc4c1d04af867ffb9ba7f75f3a576
parent70d3c556b53bdd6a3a5d1515d2807b1779610b69 (diff)
downloadcffi-1a0d94e82319a45017c623b76d177d22b57f2e1d.tar.gz
Adapt tests for Python 3.11
Fix broken tests, Python 3.11 brings in enhanced error locations in tracebacks.
-rw-r--r--c/test_c.py7
1 files changed, 7 insertions, 0 deletions
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 <function$Zcb1 at 0x$>:
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 <function$Zcb1 at 0x$>, 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 <function$Zcb1 at 0x$>, 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 <function$Zcb1 at 0x$>, 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: