pytest: pytest.raises(AssertionError) fails with compiled cython modules
Originally reported by: Steffen Roecker (BitBucket: sroecker, GitHub: sroecker)
This issue seems similar to issue #176. Running with unittest works fine, however pytest fails when the imported module assert_helper is compiled to a .so with Cython.
cython assert_helper.py
gcc -c -fPIC -I/usr/include/python2.7/ assert_helper.c
gcc -shared assert_helper.o -o assert_helper.so
platform linux2 – Python 2.7.3 – py-1.4.26 – pytest-2.6.4 plugins: xdist, cov, mock Cython==0.21
About this issue
- Original URL
- State: closed
- Created 10 years ago
- Comments: 27 (19 by maintainers)
Commits related to this issue
- test_azure: rewrite helpers to use bare asserts We're seeing a strange error in xenial builds which appear to be stemming from the AssertionError that pytest produces being _different_ from the stand... — committed to OddBloke/cloud-init by OddBloke 4 years ago
- cloudinit: drop dependencies on unittest2 and contextlib2 (#322) These libraries provide backports of Python 3's stdlib components to Python 2. As we only support Python 3, we can simply use the stdl... — committed to canonical/cloud-init by OddBloke 4 years ago
Yes, should no longer be an issue because we no longer replace the builtin
AssertionError
.