On Mon., 3 Sep. 2018, 9:44 pm Victor Stinner, <vstinner@redhat.com> wrote:
Le lun. 3 sept. 2018 à 13:09, Pablo Galindo Salgado <pablogsal@gmail.com> a écrit :
We use Cython a lot to wrap and test C and C++ libraries at work and is true that makes some aspects more simple and easy to express. Also you can leverage integration with other testing tools (pytest, mocks...etc) at to some extent. But I humbly think that Cython is not the best choice for this particular project. (...)
One compromise would be to use unit tests in C for the most basic tests, but use Cython for "integration" tests" and more complex tests.
One way to implement such a split would be to write the Cython based tests as a separate project that tested across multiple CPython branches (and potentially even across multiple Python implementations).
The Check based tests could then focus on unit testing of individual API calls, while the Cython ones would check for unintended interactions and explore edge cases (perhaps with the aid of Hypothesis).
Cheers, Nick.