def valid(expression, otherwiseMsg):
     return expression() or bad(otherwiseMsg) 
 def decideAction(tpth):
     if path.isfile(tpth):
         return loadAndTestModule(tpth)
     if path.isdir(tpth):
         return runDiagnostics(tpth)
     return bad("Unknown test path: %s"%(testPath))
 def goTest(testList):
     if testList:
         return reduce(lambda p,tf: p and tf(), testList, True)
     return bad("%s needs tests!\n"%(module.__name__))