I've done unit testing of C functions using ctypes, and that works
nicely until you need to provide a stub/mock function to be called by
the C code under test.

Can that be done using ctypes?

For example, I open a library that contains functon foo() where foo()
calls external function bar() which is not contained in the library.
Then, I provide a Python bar() function that gets called by foo() when
foo() is called?

I suspect the anser is "no".

I did a bit of googling, and found this question asked on Stack
Overflow a few years ago, but the answer made no sense. It appeared to
be ansering a different question, but I couldn't quite figure out what
that question was.

--
Grant
 
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to