testing C code with python

christopherlmarshall at yahoo.com christopherlmarshall at yahoo.com
Fri Nov 11 13:10:20 EST 2005


I have recently started using tcl to do this with C++ code and will
soon be switching to doing it with python.

I think it is a fantastic way to arrange to test C++ and C code.
Python makes an excellent test-harness, and writing interfaces for
complex units of C++ code to enable them to be tested from Python is an
valuable exercise in itself.  It forces you to make your code
inspectable and brings up all sorts of important design issues that
otherwise would never occur to you.

It was a lot of work to get started with this but once you put in the
initial effort, it gets eaiser to maintiain.  And the payoff is that it
lets you write regression tests easily so that would be too hard to do
otherwise.




More information about the Python-list mailing list