Beispiel #1
0
def test_primitive_center():
    from pyglet_helper.objects import Primitive
    from pyglet_helper.util import Vector
    _primitive = Primitive(pos=Vector([-1, 0, 1]))
    assert _primitive.center[0] == -1
    assert _primitive.center[1] == 0
    assert _primitive.center[2] == 1
Beispiel #2
0
def test_primitive_size_z_error():
    from pyglet_helper.objects import Primitive
    from pyglet_helper.util import Vector
    _primitive = Primitive()
    _primitive.size = Vector([0, 0, -1])
Beispiel #3
0
def test_primitive_height_error():
    from pyglet_helper.objects import Primitive
    _primitive = Primitive()
    _primitive.height = -1
Beispiel #4
0
def test_primitive_width_error():
    from pyglet_helper.objects import Primitive
    _primitive = Primitive()
    _primitive.width = -1
Beispiel #5
0
def test_primitive_is_light():
    from pyglet_helper.objects import Primitive
    _primitive = Primitive()
    assert not _primitive.is_light