def and_predicates(predicates): """Return a predicate that is true iff all predicates are true.""" # XXX: Should probably be in testtools to be better used by matchers. jml return lambda *args, **kwargs: all(p(*args, **kwargs) for p in predicates)
def wasSuccessful(self): """Was this result successful? Only returns True if every constituent result was successful. """ return all(self._dispatch('wasSuccessful'))