def isTestCase(obj): try: return ITestCase.implementedBy(obj) except TypeError: return False except AttributeError: return False
def isTestCase(obj): try: return ITestCase.implementedBy(obj) except TypeError: return False except AttributeError: # Working around a bug in zope.interface 3.1.0; this isn't the user's # fault, so we won't emit a warning. # See http://www.zope.org/Collectors/Zope3-dev/470. return False
def isTestCase(obj): """ Returns C{True} if C{obj} is a class that contains test cases, C{False} otherwise. Used to find all the tests in a module. """ try: return ITestCase.implementedBy(obj) except TypeError: return False except AttributeError: # Working around a bug in zope.interface 3.1.0; this isn't the user's # fault, so we won't emit a warning. # See http://www.zope.org/Collectors/Zope3-dev/470. return False