def match(self, pid=None, timeout=None): self.invocations.append((pid, timeout)) if pid and pid in self.timeout_pids: raise yara.TimeoutError("Timeout") if pid and pid in self.matching_pids: return [FakeMatch()] return []
def match(self, data=None, timeout=None): # pylint:disable=invalid-name del data, timeout raise yara.TimeoutError("Timed out.")