MCPcopy Create free account
hub / github.com/Notgnoshi/generative / test_rotated_forward

Method test_rotated_forward

tests/test_turtle.py:43–48  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

41 assert_allclose(turtle.position, (0, 0, 3))
42
43 def test_rotated_forward(self):
44 # Apparently this rotates CW
45 rotation = Rotation.from_euler("y", [np.pi / 2])
46 turtle = Turtle(rotation=rotation)
47 turtle.forward(2)
48 assert_allclose(turtle.position, (2, 0, 0), atol=1e-15)
49
50 def test_roll(self):
51 # Roll is about the longitudinal axis, so roll() + forward() won't change direction.

Callers

nothing calls this directly

Calls 2

forwardMethod · 0.95
TurtleClass · 0.90

Tested by

no test coverage detected