TestMultipoint.py 文件源码

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

项目:shotmanager 作者: OpenSolo 项目源码 文件源码
def setUp(self):
        #Create a mock vehicle object
        vehicle = mock.create_autospec(Vehicle)

        #Create a mock shotManager object
        shotmgr = mock.create_autospec(ShotManager)
        shotmgr.getParam.return_value = 0 # so mock doesn't do lazy binds

        #Run the shot constructor
        self.shot = multipoint.MultipointShot(vehicle, shotmgr)

        #Mock cableController
        self.shot.cable = mock.create_autospec(CableController)
        self.shot.cable.currentU = 0.5  # half-way through spline
        self.shot.cable.currentSeg = 0

        # create two waypoints
        loc = LocationGlobalRelative(37.873168,-122.302062, 0)
        self.shot.waypoints.append(Waypoint(loc,-90,0))
        self.shot.waypoints.append(Waypoint(loc,0,90))

        self.shot.camSpline = CatmullRom([Vector2(-180, -90), Vector2(-90, 0), Vector2(0, 90), Vector2(90, 180)])
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号