on xenial help sign in
Give default value to gu-px size

Fixes some of the autopilot greeter tests when run under X11 Approved by: Andrea Cimitan, Unity8 CI Bot

commitfb7c7430846d331ad37089a802b533855c6474a0 authorAlbert Astals Cid <albert.astals@canonical.com> dateTue 29 Nov 2016, 09:41 (10 years ago) parentb325d7e8a74c43
1 file changed+4−1
tests/autopilot/unity8/shell/tests/__init__.py+4−1
tests/autopilot/unity8/shell/tests/__init__.py+4−1
@@ -156,7 +156,10 @@ class UnityTestCase(AutopilotTestCase):
156156 def _setup_grid_size(self, scale_divisor):
157157 """Use the grid size that may be supplied or use the default."""
158158 if getattr(self, 'grid_unit_px', 0) == 0:
159− self.grid_size = int(os.getenv('GRID_UNIT_PX'))
159+ if os.getenv('GRID_UNIT_PX') == None:
160+ self.grid_size = 8
161+ else:
162+ self.grid_size = int(os.getenv('GRID_UNIT_PX'))
160163 else:
161164 self.grid_size = int(self.grid_unit_px / scale_divisor)
162165 self._environment["GRID_UNIT_PX"] = str(self.grid_size)