on xenial help sign in
Update indicator_client tests so it doesn't overwrite GRID_UNIT_PX
1b61129Christopher Lee
tests/autopilot/unity8/indicators_client/tests/__init__.py+2−2
@@ -42,10 +42,10 @@ class IndicatorsTestCase(AutopilotTestCase):
42 self.pointing_device = Pointer(self.input_device_class.create())
42 self.pointing_device = Pointer(self.input_device_class.create())
43 super(IndicatorsTestCase, self).setUp()
43 super(IndicatorsTestCase, self).setUp()
44 if grid_size != "0":
44 if grid_size != "0":
45− os.environ['GRID_UNIT_PX'] = grid_size
45+ self.patch_environment("GRID_UNIT_PX", str(grid_size))
46 self.grid_size = int(grid_size)
46 self.grid_size = int(grid_size)
47 else:
47 else:
48− self.grid_size = int(os.environ['GRID_UNIT_PX'])
48+ self.grid_size = int(os.getenv('GRID_UNIT_PX'))
49
49
50 if os.path.realpath(__file__).startswith("/usr/"):
50 if os.path.realpath(__file__).startswith("/usr/"):
51 self.launch_test_installed(geometry)
51 self.launch_test_installed(geometry)