On 6/6/2011 1:29 PM, rusi wrote:
On Jun 5, 11:33 pm, Terry Reedy<tjre...@udel.edu>  wrote:

Let me add something not said much here about designing functions: start
with both a clear and succinct definition *and* test cases. (I only
started writing tests first a year ago or so.)

I am still one year in the future :-;
Which framework do you recommend? Nose? test.py?

As I explained in a followup post, I am currently using a custom function test function that accepts i/o pairs with exception classes as 'outputs'. It was inspired by test.py, but that is both overkill and an unwanted external dependency for my current project. I also wrote and use an iterator test function and a specialized iterator test function for iterators that return sequences. (For better error reporting, the latter tests items within each sequence rather than each sequence as a whole. This is especially helpful when the items are themselves collections, as in some combinatorial iterators.)

--
Terry Jan Reedy

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to