Exemple #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)
Exemple #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)
Exemple #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)
Exemple #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)
Exemple #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)
Exemple #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)
Exemple #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)
Exemple #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)
Exemple #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)
Exemple #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)