James G. Sack (jim) wrote:
2. mingle with source code
- probably the easiest but just seems "dirty"
- distribution scripts need to exclude files "test_*.py"

This is my choice. When I'm editing a file, I'm also likely to need to edit its test file simultaneously. I want people to see both.

I've tried the others. The only one I find tolerable is putting tests in a subdirectory of the source directory itself. The big disadvantage with that is that your test script isn't grabbing dependent files in the same way as the source code. This can lead to some silly bugs, but normally isn't a big deal.

Embedding in source code really isn't acceptable--especially in the case of C where you would need a gazillion declarations to make it all work. Keeping a parallel tree or dumping them in a big lump violates DRY-don't repeat yourself. You have to keep the source tree hierarchy synchronized with either another directory hierarchy or a test script description. Pass.

-a

--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg

Reply via email to