test_middle.py 文件源码

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

项目:Stroll-Safely 作者: Munnu 项目源码 文件源码
def test_distance_to_coords_formula_lngwise(self):
        """ tests the longitudional (east, west) aspect of the formula to see
            if we get waypoints that have the same latitude, different lng """

        point_lat = 40.8131494
        point_lng = -73.95032520000001
        lngwise_potential_waypoints = distance_to_coords_formula(point_lat,
                                                                 point_lng, 90, 270)
        longitude_e = lngwise_potential_waypoints[0][1]
        longitude_w = lngwise_potential_waypoints[1][1]

        latitude_e = lngwise_potential_waypoints[0][0]
        latitude_w = lngwise_potential_waypoints[1][0]

        eq_(latitude_e, latitude_w)
        eq_(latitude_e, point_lat)
        eq_(latitude_w, point_lat)
        assert_not_equal(longitude_e, longitude_w)
        assert_not_equal(longitude_e, point_lng)
        assert_not_equal(longitude_w, point_lng)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号