test_window.py 692 B

1234567891011121314151617
  1. def test_window_basic(window):
  2. from panda3d.core import WindowProperties
  3. assert window is not None
  4. current_props = window.get_properties()
  5. default_props = WindowProperties.get_default()
  6. # Opening the window changes these from the defaults. Note that we have
  7. # no guarantee that it opens in the foreground or with the requested size.
  8. default_props.set_size(current_props.get_size())
  9. default_props.set_origin(current_props.get_origin())
  10. default_props.set_minimized(False)
  11. default_props.foreground = current_props.foreground
  12. default_props.z_order = current_props.z_order
  13. # The rest should be the same
  14. assert current_props == default_props