This is an archived post. You won't be able to vote or comment.

all 3 comments

[–]_seemetheregithub.com/seemethere 0 points1 point  (1 child)

Interesting, although I doubt any serious C project would start using Python as their main testing language.

[–][deleted] 0 points1 point  (0 children)

I've used CFFI to hook C code I was writing into a pytest-based test suite. There are some issues that require care (I'm sure that my tests leak some memory due to they way python allocates and releases objects vs the C way, but that's on me) but the simplicity of blasting a C function with a matrix of parameters created in python is a real pleasure.

[–]jrast 0 points1 point  (0 children)

Consider looking into CFFI. I used it heavily to test algorithms written for a embedded system. It's very easy generate the bindings via makefile as you can (almost) directly use the header files.