コード例 #1
0
 def test_repr_contains_bound_parameter(self):
     assert_predicate_name_equals(
         boolean.any_of([boolean.false, boolean.true]),
         "any_of(false, true)")
コード例 #2
0
 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
コード例 #3
0
 def test_returns_true_for_some_failing_predicate(
         self, predicates: Iterable[Predicate]) -> None:
     assert boolean.any_of(predicates)(0) is True
コード例 #4
0
 def test_returns_false_for_only_failing_predicate(
         self, predicates: Iterable[Predicate]) -> None:
     assert boolean.any_of(predicates)(0) is False
コード例 #5
0
 def test_returns_false_for_empty_set_of_predicates(self) -> None:
     predicate: Predicate[int] = boolean.any_of(())
     assert predicate(0) is False