|
@@ -1,23 +1,26 @@
|
|
|
import pytest
|
|
import pytest
|
|
|
|
|
|
|
|
[email protected]
|
|
|
|
|
-def graphics_pipe(scope='session'):
|
|
|
|
|
|
|
+
|
|
|
|
|
[email protected](scope='session')
|
|
|
|
|
+def graphics_pipe():
|
|
|
from panda3d.core import GraphicsPipeSelection
|
|
from panda3d.core import GraphicsPipeSelection
|
|
|
|
|
|
|
|
pipe = GraphicsPipeSelection.get_global_ptr().make_default_pipe()
|
|
pipe = GraphicsPipeSelection.get_global_ptr().make_default_pipe()
|
|
|
|
|
|
|
|
- if not pipe.is_valid():
|
|
|
|
|
- pytest.xfail("GraphicsPipe is invalid")
|
|
|
|
|
|
|
+ if pipe is None or not pipe.is_valid():
|
|
|
|
|
+ pytest.skip("GraphicsPipe is invalid")
|
|
|
|
|
|
|
|
yield pipe
|
|
yield pipe
|
|
|
|
|
|
|
|
[email protected]
|
|
|
|
|
-def graphics_engine(scope='session'):
|
|
|
|
|
|
|
+
|
|
|
|
|
[email protected](scope='session')
|
|
|
|
|
+def graphics_engine():
|
|
|
from panda3d.core import GraphicsEngine
|
|
from panda3d.core import GraphicsEngine
|
|
|
|
|
|
|
|
engine = GraphicsEngine.get_global_ptr()
|
|
engine = GraphicsEngine.get_global_ptr()
|
|
|
yield engine
|
|
yield engine
|
|
|
|
|
|
|
|
|
|
+
|
|
|
@pytest.fixture
|
|
@pytest.fixture
|
|
|
def window(graphics_pipe, graphics_engine):
|
|
def window(graphics_pipe, graphics_engine):
|
|
|
from panda3d.core import GraphicsPipe, FrameBufferProperties, WindowProperties
|
|
from panda3d.core import GraphicsPipe, FrameBufferProperties, WindowProperties
|