Lambda question
Terry Reedy
tjreedy at udel.edu
Mon Jun 6 21:56:51 EDT 2011
On 6/6/2011 1:29 PM, rusi wrote:
> On Jun 5, 11:33 pm, Terry Reedy<tjre... at 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
More information about the Python-list
mailing list