(self)
| 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. |