[Tutor] How to test a function which runs a passed in function twice?

Alan Gauld alan.gauld at yahoo.co.uk
Sun Oct 2 20:00:42 EDT 2016


On 02/10/16 23:47, boB Stepp wrote:

> adequately testing it.  I cannot even conceive of what might be edge
> cases for this function.  

I meant to add, the obvious boundaries for this actual function
are passing in non-callable values, or callables that require
arguments.

And to handle those you might want a try/except to catch
TypeErrors... Although what would you do with them having
caught them???

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos




More information about the Tutor mailing list