예제 #1
0
 def test_repr_contains_bound_parameter(self):
     assert_predicate_name_equals(interval.open_closed(0, 1),
                                  "open_closed(0, 1)")
예제 #2
0
 def test_lower_bound(self) -> None:
     intv = interval.open_closed(5, 10)
     assert intv(5) is True
     assert intv(4.9999) is False
예제 #3
0
 def test_upper_bound(self) -> None:
     intv = interval.open_closed(5, 10)
     assert intv(10) is False
     assert intv(9.9999) is True
예제 #4
0
 def test_returns_true_for_middle_value(self) -> None:
     assert interval.open_closed(1, 3)(2) is True