How many times does unittest run each test?

Josh English Joshua.R.English at gmail.com
Sat Aug 10 20:47:44 EDT 2013


On Saturday, August 10, 2013 4:14:09 PM UTC-7, Roy Smith wrote:

> 
> 
> I don't understand the whole SimpleChecker class.  You've created a 
> class, and defined your own __call__(), just so you can check if a 
> string is in a list?  Couldn't this be done much simpler with a plain 
> old function:
> 

> def checker(thing):
>     print "calling %s" % thing
>     return thing in ['a','b','c']

SimpleCheck is an extremely watered down version of my XML checker (https://pypi.python.org/pypi/XMLCheck/0.6.7). I'm working a feature that allows the checker to call a function to get acceptable values, instead of defining them at the start of the program. I included all of that because it's the shape of the script I'm working with.

The real problem was setting additional handlers where they shouldn't be.

Josh



More information about the Python-list mailing list