summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Friedrich Bolz-Tereick <cfbolz@gmx.de>2021-04-24 11:01:50 +0200
committerCarl Friedrich Bolz-Tereick <cfbolz@gmx.de>2021-04-24 11:01:50 +0200
commita44dfe022e409b51c01777afb141ab3e9bdfe483 (patch)
treedea05f9dd270cf126baa2ac0dec5a8290021411d
parentf17762f93b1f882554b6fe12c8271f907aebf6ad (diff)
downloadcffi-a44dfe022e409b51c01777afb141ab3e9bdfe483.tar.gz
fix a test that fails in the 3.10 alphas and will start failing on pypy soonfix-attribute-error-test-3.10
once I merge that feature: AttributeError is printing extra information
-rw-r--r--c/test_c.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/c/test_c.py b/c/test_c.py
index 788500e..007f4aa 100644
--- a/c/test_c.py
+++ b/c/test_c.py
@@ -1452,6 +1452,8 @@ TypeError: $integer$
sys.stderr = cStringIO.StringIO()
seen = "not a list" # this makes the oops() function crash
assert ff(bigvalue) == -42
+ # the $ after the AttributeError message are for the suggestions that
+ # will be added in Python 3.10
assert matches(sys.stderr.getvalue(), """\
From cffi callback <function$Zcb1 at 0x$>:
Trying to convert the result back to C:
@@ -1462,7 +1464,7 @@ During the call to 'onerror', another exception occurred:
Traceback (most recent call last):
File "$", line $, in oops
$
-AttributeError: 'str' object has no attribute 'append'
+AttributeError: 'str' object has no attribute 'append'$
""", """\
Exception ignored from cffi callback <function$Zcb1 at 0x$>, trying to convert the result back to C:
Traceback (most recent call last):
@@ -1473,7 +1475,7 @@ 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'
+AttributeError: 'str' object has no attribute 'append'$
""")
finally:
sys.stderr = orig_stderr