コード例 #1
0
ファイル: test_range.py プロジェクト: beyonddevnull/pynagios
 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
ファイル: test_range.py プロジェクト: beyonddevnull/pynagios
 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
ファイル: test_range.py プロジェクト: beyonddevnull/pynagios
 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
ファイル: test_range.py プロジェクト: beyonddevnull/pynagios
 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
ファイル: test_range.py プロジェクト: beyonddevnull/pynagios
 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)