예제 #1
0
    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 []
예제 #2
0
 def match(self, data=None, timeout=None):  # pylint:disable=invalid-name
     del data, timeout
     raise yara.TimeoutError("Timed out.")