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

Method test_roll

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

Source from the content-addressed store, hash-verified

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.
52 turtle = Turtle()
53 assert_allclose(turtle.position, (0, 0, 0))
54 turtle.roll(45)
55 turtle.forward()
56 assert_allclose(turtle.position, (0, 0, 1))
57 turtle.yaw(45)
58 turtle.forward()
59 assert_allclose(turtle.position, (1 / 2, -1 / 2, 1 + np.sqrt(2) / 2))
60
61 def test_pitch(self):
62 turtle = Turtle()

Callers

nothing calls this directly

Calls 4

rollMethod · 0.95
forwardMethod · 0.95
yawMethod · 0.95
TurtleClass · 0.90

Tested by

no test coverage detected