test_middle.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:Stroll-Safely 作者: Munnu 项目源码 文件源码
def test_distance_to_coords_formula_latwise(self):
        """ tests the latitudional (north, south) aspect of the formula to see
            if we get waypoints that have the same longitude, different lat """

        point_lat = 40.8131494
        point_lng = -73.95032520000001
        latwise_potential_waypoints = distance_to_coords_formula(point_lat,
                                                                 point_lng, 0, 180)
        longitude_n = latwise_potential_waypoints[0][1]
        longitude_s = latwise_potential_waypoints[1][1]

        latitude_n = latwise_potential_waypoints[0][0]
        latitude_s = latwise_potential_waypoints[1][0]

        eq_(longitude_n, longitude_s)
        eq_(longitude_n, point_lng)
        eq_(longitude_s, point_lng)
        assert_not_equal(latitude_n, latitude_s)
        assert_not_equal(latitude_n, point_lat)
        assert_not_equal(latitude_s, point_lat)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号