Example #1
0
def test_gso_create_model():
    gso = GSO("foo")
    model = "smiley.egg"
    gso.set_model(model)
    gso.create_model()
    nodes = gso.descendants()
    assert any(isinstance(n.node(), resource_types) for n in nodes)
Example #2
0
def test_init_tree():
    sso = GSO("foo")
    sso2 = GSO("bar")
    sso.set_model("smiley.egg")
    sso2.set_model("smiley.egg")
    sso2.reparentTo(sso)
    sso.init_tree()
    nodes = sso.descendants()
    assert any(isinstance(n.node(), resource_types) for n in nodes)
Example #3
0
def test_init_resources_model_shape():
    gso = GSO("bar")
    gso.set_model("smiley.egg")
    gso.init_resources()
    gnodes = gso.descendants(depths=slice(1, None))
    pso = RBSO("bar")
    pso.set_shape("Box")
    pso.init_resources()
    assert any(isinstance(n.node(), resource_types) for n in gnodes)
    assert pso.node().getNumShapes() > 0