Skip to content

Commit 95e2621

Browse files
committed
test: Add test_load_actor
This test makes sure the Python file loader works with the Actor class.
1 parent 305078c commit 95e2621

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

tests/test_load.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from direct.actor.Actor import Actor
12
import panda3d.core as p3d
23
import pytest #pylint:disable=wrong-import-order
34

@@ -26,3 +27,12 @@ def test_load_prc(showbase, modelpath):
2627
scene = showbase.loader.load_model(modelpath, noCache=True)
2728
p3d.unload_prc_file(page)
2829
assert scene.find('**/+BulletRigidBodyNode')
30+
31+
def test_load_actor(modelroot):
32+
actor = Actor(p3d.Filename(modelroot, 'Fox.glb'))
33+
assert actor
34+
35+
print(actor.getAnimNames())
36+
assert 'Walk' in actor.getAnimNames()
37+
38+
actor.play('Walk')

0 commit comments

Comments
 (0)