示例#1
0
    def test_arc_length_to_latitude(self):
        km = 200
        expected = 1.7966305682390429

        # Test positive km
        output = geodetics.arc_length_to_latitude(km)
        self.assertAlmostEqual(output, expected)

        # Test negative km
        output = geodetics.arc_length_to_latitude(-km)
        self.assertAlmostEqual(output, -expected)
    def test_arc_length_to_latitude(self):
        km = 200
        expected = 1.7966305682390429

        # Test positive km
        output = geodetics.arc_length_to_latitude(km)
        self.assertAlmostEqual(output, expected)

        # Test negative km
        output = geodetics.arc_length_to_latitude(-km)
        self.assertAlmostEqual(output, -expected)
示例#3
0
 def test_arc_length_to_latitude_zero_km(self):
     self.assertEqual(geodetics.arc_length_to_latitude(0), 0)
 def test_arc_length_to_latitude_zero_km(self):
     self.assertEqual(geodetics.arc_length_to_latitude(0), 0)