Пример #1
0
 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)
Пример #2
0
 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)
Пример #3
0
 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)
Пример #4
0
 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)
Пример #5
0
 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)
Пример #6
0
 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)
Пример #7
0
 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)
Пример #8
0
 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)
Пример #9
0
 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)
Пример #10
0
 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)