예제 #1
0
    def test_seconds5(self):

        expected_data = (12, 13, 14.567, 0.001)

        line = "12 13 14.567"

        data = checkSexagesimal(line)
        assert expected_data == data
예제 #2
0
    def test_seconds1(self):

        expected_data = (12, 13, 14, 1)

        line = "12 13 14"

        data = checkSexagesimal(line)
        assert expected_data == data
예제 #3
0
    def test_minutes2(self):

        expected_data = (12, 13, 0, 60)

        line = "12 13   "

        data = checkSexagesimal(line)
        assert expected_data == data
예제 #4
0
    def test_minutes1(self):

        expected_data = (12, 13.1, 0, 6)

        line = "12 13.1 "

        data = checkSexagesimal(line)
        assert expected_data == data
예제 #5
0
    def test_no_minutes1(self):

        line = "12"
        with pytest.raises(RuntimeError) as e_info:
            data = checkSexagesimal(line)
        assert self.expected_message + line == str(e_info.value)
예제 #6
0
    def test_bad_seconds3(self):

        line = " 13 13 14.56  "
        with pytest.raises(RuntimeError) as e_info:
            data = checkSexagesimal(line)
        assert self.expected_message + line == str(e_info.value)