Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self, *args, **kwargs):
self._calls = []
threading_support = kwargs.pop('threading_support', False)
clear_env_var = kwargs.pop('clear_env_var', False)
self.handler = hunter._prepare_predicate(*args, **kwargs)
self._tracer = hunter.trace(self._append, threading_support=threading_support, clear_env_var=clear_env_var)
def test_mix_predicates_with_callables():
hunter._prepare_predicate(Q(module=1) | Q(lambda: 2))
hunter._prepare_predicate(Q(lambda: 2) | Q(module=1))
hunter._prepare_predicate(Q(module=1) & Q(lambda: 2))
hunter._prepare_predicate(Q(lambda: 2) & Q(module=1))
hunter._prepare_predicate(Q(module=1) | (lambda: 2))
hunter._prepare_predicate((lambda: 2) | Q(module=1))
hunter._prepare_predicate(Q(module=1) & (lambda: 2))
hunter._prepare_predicate((lambda: 2) & Q(module=1))
def test_mix_predicates_with_callables():
hunter._prepare_predicate(Q(module=1) | Q(lambda: 2))
hunter._prepare_predicate(Q(lambda: 2) | Q(module=1))
hunter._prepare_predicate(Q(module=1) & Q(lambda: 2))
hunter._prepare_predicate(Q(lambda: 2) & Q(module=1))
hunter._prepare_predicate(Q(module=1) | (lambda: 2))
hunter._prepare_predicate((lambda: 2) | Q(module=1))
hunter._prepare_predicate(Q(module=1) & (lambda: 2))
hunter._prepare_predicate((lambda: 2) & Q(module=1))