def test_repr_contains_bound_parameter(self): assert_predicate_name_equals( boolean.any_of([boolean.false, boolean.true]), "any_of(false, true)")
def test_materializes_generated_predicates( self, predicates: Iterable[Predicate]) -> None: predicate = boolean.any_of(predicate for predicate in predicates) assert predicate(0) is True assert predicate(0) is True
def test_returns_true_for_some_failing_predicate( self, predicates: Iterable[Predicate]) -> None: assert boolean.any_of(predicates)(0) is True
def test_returns_false_for_only_failing_predicate( self, predicates: Iterable[Predicate]) -> None: assert boolean.any_of(predicates)(0) is False
def test_returns_false_for_empty_set_of_predicates(self) -> None: predicate: Predicate[int] = boolean.any_of(()) assert predicate(0) is False