Commit ed6f304e authored by Carl Friedrich Bolz-Tereick's avatar Carl Friedrich Bolz-Tereick
Browse files

fix a test that fails in the 3.10 alphas and will start failing on pypy soon

once I merge that feature: AttributeError is printing extra information

--HG--
branch : fix-attribute-error-test-3.10
parent c16abb8f809f
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment