示例#1
0
    def test_assert_is_valid_longitude_negative_in_west_true(self):
        """Checks assert_is_valid_longitude with negative_in_west_flag = True.

        In this case, longitude is negative in western hemisphere.
        """

        error_checking.assert_is_valid_longitude(
            SINGLE_LNG_NEGATIVE_IN_WEST_DEG, negative_in_west_flag=True)
示例#2
0
    def test_assert_is_valid_longitude_negative_in_west_false(self):
        """Checks assert_is_valid_longitude with negative_in_west_flag = True.

        In this case, longitude is positive in western hemisphere.
        """

        with self.assertRaises(ValueError):
            error_checking.assert_is_valid_longitude(
                SINGLE_LNG_POSITIVE_IN_WEST_DEG, negative_in_west_flag=True)
示例#3
0
    def test_assert_is_valid_longitude_true(self):
        """Checks assert_is_valid_longitude when longitude is valid."""

        error_checking.assert_is_valid_longitude(SINGLE_LONGITUDE_DEG)
示例#4
0
    def test_assert_is_valid_longitude_false(self):
        """Checks assert_is_valid_longitude when longitude is invalid."""

        with self.assertRaises(ValueError):
            error_checking.assert_is_valid_longitude(SINGLE_LNG_INVALID_DEG)