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

Method test_initial_position

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

Source from the content-addressed store, hash-verified

9
10class TurtleTests(unittest.TestCase):
11 def test_initial_position(self):
12 turtle = Turtle()
13 assert_allclose(turtle.position, (0, 0, 0))
14 # Provide tuple, list, np.ndarray
15 turtle = Turtle(position=(1, 1, 1))
16 assert_allclose(turtle.position, (1, 1, 1))
17
18 turtle = Turtle(position=[2, 2, 2])
19 assert_allclose(turtle.position, (2, 2, 2))
20
21 turtle = Turtle(position=np.array([3, 3, 3]))
22 assert_allclose(turtle.position, (3, 3, 3))
23
24 def test_initial_rotation(self):
25 turtle = Turtle()

Callers

nothing calls this directly

Calls 1

TurtleClass · 0.90

Tested by

no test coverage detected