def test_world_coords(self): cs1 = CoordSystem(origin=(1, 2, 3)) cs2 = CoordSystem(origin=(1, 1, 1)) box = Box() box.world_coords = cs2 m = Mate(box, cs1) self.assertEqual(m.world_coords, cs1 + cs2)
def test_mate(self): mate = Mate(Box()) cs1 = CoordSystem(origin=(1, 1, 1)) box = Box() box.world_coords = cs1 cs2 = CoordSystem(origin=(2, 3, 4)) coords = Mate(box, cs2) c = Fixed(mate, coords) # given world_coords is from a mate self.assertEqual(cs1 + cs2, c.world_coords)