class Failure:
def __init__(self, suite: str, module: str, test: str, message: str):
self.suite: str = suite
self.module: str = module
self.test: str = test
self.message: str = message
def __eq__(self, obj):
return type(obj) is type(self) and obj.__dict__ == self.__dict__
def any_match(self, obj_list: list[object] = []):
return any(type(obj) is type(self) and obj.__dict__ == self.__dict__ for obj in obj_list)