Suppose I am given some (thoroughly tested) C or C++ code. And suppose I have implemented some functionality in Cython that makes use of this C/C++ code. The Cython functionality basically serves as a Python interface to my C/C++ code.
Now I wish to write Python code to test my Cython code. Is it valid to use ctypes to access the C/C++ compiled shared object and compare that with the results from the corresponding Cython functionality?
I tend to think the answer to the question is yes, this is a valid test. My hesitation is that, without knowing the internals of Cython, it seems possible or likely that Cython is doing under the hood exactly what I'm proposing to do in this test.
Aucun commentaire:
Enregistrer un commentaire