Пример #1
0
    def test_find_min_value_greater_or_equal_large_not_in_array(self):
        """Ensures correct output from _find_min_value_greater_or_equal.

        In this case, the test value is large and does not occur in the input
        array.
        """

        _, this_index = gridded_forecasts._find_min_value_greater_or_equal(
            SORTED_ARRAY, LARGE_TEST_VALUE_NOT_IN_ARRAY)
        self.assertTrue(this_index == MIN_GEQ_INDEX_LARGE_NOT_IN_ARRAY)
Пример #2
0
    def test_find_min_value_greater_or_equal_small_in_array(self):
        """Ensures correct output from _find_min_value_greater_or_equal.

        In this case, the test value is small and matches a member of the input
        array.
        """

        _, this_index = gridded_forecasts._find_min_value_greater_or_equal(
            SORTED_ARRAY, SMALL_TEST_VALUE_IN_ARRAY)
        self.assertTrue(this_index == MIN_GEQ_INDEX_SMALL_IN_ARRAY)