Skip to content

Commit 105a552

Browse files
committed
added test of scene.clear
1 parent d14607e commit 105a552

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/compas/scene/test_scene.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,3 +99,15 @@ def test_sceneobject_transform():
9999
sceneobj3.worldtransformation
100100
== sceneobj1.frame.to_transformation() * sceneobj2.frame.to_transformation() * sceneobj3.frame.to_transformation() * sceneobj3.transformation
101101
)
102+
103+
def test_scene_clear():
104+
scene = Scene()
105+
sceneobj1 = scene.add(Box())
106+
sceneobj2 = scene.add(Box(), parent=sceneobj1)
107+
sceneobj3 = scene.add(Box(), parent=sceneobj2)
108+
109+
assert len(scene.objects) == 3
110+
111+
scene.clear(clear_context=False, clear_scene=True)
112+
113+
assert len(scene.objects) == 0

0 commit comments

Comments
 (0)