on xenial help sign in
Make addition for big screen test, there might be a better way to do this.
commit78e0bc90853f3a642af61c2fd2cf034da43b9bf5 authorChristopher Lee <chris.lee@canonical.com> dateWed 17 Jul 2013, 19:09 (13 years ago) parent24ff9a9
2 files changed+11−5
tests/autopilot/unity8/shell/tests/__init__.py+8−4 tests/autopilot/unity8/shell/tests/test_big_screen_alignment.py+3−1
tests/autopilot/unity8/shell/tests/__init__.py+8−4
@@ -82,10 +82,14 @@ class Unity8TestCase(AutopilotTestCase):
8282 self.patch_environment("GRID_UNIT_PX", str(self.grid_size))
8383
8484 def _geo_larger_than_display(self, width, height):
85− screen = Display.create()
86− screen_width = screen.get_screen_width()
87− screen_height = screen.get_screen_height()
88− return (width > screen_width) or (height > screen_height)
85+ should_scale = getattr(self, 'scale_geo', True)
86+ if should_scale:
87+ screen = Display.create()
88+ screen_width = screen.get_screen_width()
89+ screen_height = screen.get_screen_height()
90+ return (width > screen_width) or (height > screen_height)
91+ else:
92+ return False
8993
9094 def _get_scaled_down_geo(self, width, height):
9195 divisor = 1
tests/autopilot/unity8/shell/tests/test_big_screen_alignment.py+3−1
@@ -18,7 +18,9 @@ from unity8.shell.tests import Unity8TestCase
1818# Also, this doesn't work as automatically scales the geometry . . .
1919class ScreenAlignmentTests(Unity8TestCase):
2020
21− scenarios = [('Big Screen', dict(app_width=2560, app_height=1600, grid_unit_px=20))]
21+ scenarios = [
22+ ('Big Screen', dict(app_width=2560, app_height=1600, grid_unit_px=20, scale_geo=False))
23+ ]
2224
2325 def test_hud_not_shown_greeter(self):
2426 self.launch_unity()