File tree Expand file tree Collapse file tree 2 files changed +12
-8
lines changed
Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Original file line number Diff line number Diff line change 11import pytest
22
3- @pytest .fixture
4- def graphics_pipe (scope = 'session' ):
3+
4+ @pytest .fixture (scope = 'session' )
5+ def graphics_pipe ():
56 from panda3d .core import GraphicsPipeSelection
67
78 pipe = GraphicsPipeSelection .get_global_ptr ().make_default_pipe ()
89
9- if not pipe .is_valid ():
10- pytest .xfail ("GraphicsPipe is invalid" )
10+ if pipe is None or not pipe .is_valid ():
11+ pytest .skip ("GraphicsPipe is invalid" )
1112
1213 yield pipe
1314
14- @pytest .fixture
15- def graphics_engine (scope = 'session' ):
15+
16+ @pytest .fixture (scope = 'session' )
17+ def graphics_engine ():
1618 from panda3d .core import GraphicsEngine
1719
1820 engine = GraphicsEngine .get_global_ptr ()
1921 yield engine
2022
23+
2124@pytest .fixture
2225def window (graphics_pipe , graphics_engine ):
2326 from panda3d .core import GraphicsPipe , FrameBufferProperties , WindowProperties
Original file line number Diff line number Diff line change @@ -5,11 +5,12 @@ def test_window_basic(window):
55 current_props = window .get_properties ()
66 default_props = WindowProperties .get_default ()
77
8- # Opening the window changes these from the defaults
8+ # Opening the window changes these from the defaults. Note that we have
9+ # no guarantee that it opens in the foreground or with the requested size.
910 default_props .set_size (current_props .get_size ())
1011 default_props .set_origin (current_props .get_origin ())
1112 default_props .set_minimized (False )
12- default_props .set_foreground ( True )
13+ default_props .foreground = current_props . foreground
1314
1415 # The rest should be the same
1516 assert current_props == default_props
You can’t perform that action at this time.
0 commit comments