MCPcopy Create free account
hub / github.com/bigdra50/unity-cli / test_modify_position

Method test_modify_position

tests/integration/test_gameobject.py:53–66  ·  view source on GitHub ↗
(self, gameobject: GameObjectAPI)

Source from the content-addressed store, hash-verified

51
52class TestModify:
53 def test_modify_position(self, gameobject: GameObjectAPI) -> None:
54 name = "_IntegrationTest_Modify"
55
56 try:
57 gameobject.create(name=name)
58 gameobject.modify(name=name, position=[1.0, 2.0, 3.0])
59 result = gameobject.find(name=name)
60 go = result["objects"][0]
61
62 assert go["position"][0] == pytest.approx(1.0, abs=0.01)
63 assert go["position"][1] == pytest.approx(2.0, abs=0.01)
64 assert go["position"][2] == pytest.approx(3.0, abs=0.01)
65 finally:
66 gameobject.delete(name=name)
67
68 def test_set_active_toggle(self, gameobject: GameObjectAPI) -> None:
69 name = "_IntegrationTest_Active"

Callers

nothing calls this directly

Calls 4

createMethod · 0.80
findMethod · 0.80
modifyMethod · 0.45
deleteMethod · 0.45

Tested by

no test coverage detected