def test_in_range_inclusive(self): """ Tests that on inclusive ranges, values that are in the range are valid. """ instance = Range("@10:20") assert instance.in_range(15)
def test_in_range_inclusive_equal_to_end(self): """ Tests that on inclusive ranges, values that are equal to the end are valid. """ instance = Range("@10:20") assert instance.in_range(20)
def test_in_range_above_valid(self): """ Tests that values outside the upper end of the range are valid. """ instance = Range("10:20") assert instance.in_range(21)
def test_in_range_below_valid(self): """ Tests that values outside the lower end of the range are valid. """ instance = Range("10:20") assert instance.in_range(9)
def test_in_range_exclusive_equal_to_end_invalid(self): """ Tests that exclusive ranges do not count the end value. """ instance = Range("10:20") assert not instance.in_range(20)