def test_screen_refresh(): """ Test if a Screen object get the refresh of its panel if not set """ s = Screen(refresh=-1) assert s.refresh == -1 s.refresh = 1 assert s.refresh == 1 p = Panel(refresh=2, keep_unplugged_screens=True) s.refresh = -1 s.panel = p assert s.refresh == p.refresh assert s.refresh == 2