on xenial help sign in
Give default value to gu-px size
8a74c43Albert Astals Cid
tests/autopilot/unity8/shell/tests/__init__.py+4−1
@@ -156,7 +156,10 @@ class UnityTestCase(AutopilotTestCase):
156 def _setup_grid_size(self, scale_divisor):
156 def _setup_grid_size(self, scale_divisor):
157 """Use the grid size that may be supplied or use the default."""
157 """Use the grid size that may be supplied or use the default."""
158 if getattr(self, 'grid_unit_px', 0) == 0:
158 if getattr(self, 'grid_unit_px', 0) == 0:
159+ if os.getenv('GRID_UNIT_PX') == None:
160+ self.grid_size = 8
161+ else:
159− self.grid_size = int(os.getenv('GRID_UNIT_PX'))
162+ self.grid_size = int(os.getenv('GRID_UNIT_PX'))
160 else:
163 else:
161 self.grid_size = int(self.grid_unit_px / scale_divisor)
164 self.grid_size = int(self.grid_unit_px / scale_divisor)
162 self._environment["GRID_UNIT_PX"] = str(self.grid_size)
165 self._environment["GRID_UNIT_PX"] = str(self.grid_size)