On Thu, 2007-11-01 at 18:24 -0400, BJörn Lindqvist wrote: > Hello Tim, > > I have found that a good way to write tests, is to write them in > Python. Almost all libraries (and certainly all in the GNOME platform) > has Python bindings, so it doesn't matter if you use C or Python to > write your tests. In fact, writing the tests in Python should be > beneficial because the bindings only exposes the public api so you are > prevented from referencing internals.
Problem is, most modules don't own their python bindings. So: 1) Your need to have python bindings installed before you can test the module. Circular dependency BTW. 2) Your tests may hit binding bugs. It's hard to know. 3) Dependencies. No dependencies is part of the design Tim brought. > There are a few unit testing frameworks for Python, nosetest (my > favorite), PyUnit, py.tst and many more. They all fulfill the > requirements you listed and are much faster to use because there is no > compilation involved. Running individual tests is a piece of cake. And > of course, since the tests are written in Python they are about 100 > times easier to implement and maintain. > > YMMV of course. But even if there is a need for a test framework > written in pure C, does it really have to be placed in libglib.so? For > other languages than C that test framework is dead weight since they > already have better solutions. If it's like 2000 lines of code and 10 entry points, the overhead is nonexistent. -- behdad http://behdad.org/ "Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety." -- Benjamin Franklin, 1759 _______________________________________________ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list