diff options
author | Armin Rigo <armin.rigo@gmail.com> | 2021-04-24 11:59:41 +0000 |
---|---|---|
committer | Armin Rigo <armin.rigo@gmail.com> | 2021-04-24 11:59:41 +0000 |
commit | 6f56c6db7531f89aba2b5e331a7a0b158f1f2a41 (patch) | |
tree | dea05f9dd270cf126baa2ac0dec5a8290021411d | |
parent | f17762f93b1f882554b6fe12c8271f907aebf6ad (diff) | |
parent | a44dfe022e409b51c01777afb141ab3e9bdfe483 (diff) | |
download | cffi-6f56c6db7531f89aba2b5e331a7a0b158f1f2a41.tar.gz |
Merge branch 'branch/fix-attribute-error-test-3.10' into 'branch/default'
fix a test that fails in the 3.10 alphas and will start failing on pypy soon
See merge request pypy/cffi!104
-rw-r--r-- | c/test_c.py | 6 |
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 |