@@ -1,7 +1,7 @@
11# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
22#
33# Unity Indicators Autopilot Test Suite
4−# Copyright (C) 2013, 2014, 2015 Canonical
4+# Copyright (C) 2015 Canonical
55#
66# This program is free software: you can redistribute it and/or modify
77# it under the terms of the GNU General Public License as published by
@@ -19,13 +19,16 @@
1919from autopilot import input
2020from unity8.shell import emulators
2121from unity8.shell.emulators import main_window
22−import unity8.indicators
2322import ubuntuuitoolkit
2423
24+
2525class IndicatorsMenu (emulators.UnityEmulatorBase):
26+
2627 """Autopilot helper for the IndicatorPage component."""
28+
2729 def open(self):
28− widget = self.select_single('IndicatorItem',objectName='indicator-sound-panelItem')
30+ widget = self.select_single(
31+ 'IndicatorItem', objectName='indicator-sound-panelItem')
2932 start_x, start_y = input.get_center_point(widget)
3033 end_x = start_x
3134 end_y = self.globalRect.y + self.openedHeight
@@ -42,11 +45,16 @@ class IndicatorsMenu (emulators.UnityEmulatorBase):
4245 objectName='indicator-rotation-lock-panelItem')
4346 self.pointing_device.click_object(indicator_rotation_icon)
4447 self.fullyOpened.wait_for(True)
45− return DisplayIndicator(self.select_single('IndicatorPage', objectName='indicator-rotation-lock-page'))
48+ return DisplayIndicator(
49+ self.select_single(
50+ 'IndicatorPage', objectName='indicator-rotation-lock-page'))
4651
47−class DisplayIndicator (emulators.UnityEmulatorBase):
48− def __init__ (self, subject):
52+
53+class DisplayIndicator(emulators.UnityEmulatorBase):
54+
55+ def __init__(self, subject):
4956 self.__subject = subject
57+
5058 def __getattr__(self, name):
5159 return getattr(self.__subject, name)
5260
@@ -57,9 +65,9 @@ class DisplayIndicator (emulators.UnityEmulatorBase):
5765 to 'On'.
5866
5967 """
60− switcher = self.select_single(ubuntuuitoolkit.CheckBox, objectName='switcher')
68+ switcher = self.select_single(
69+ ubuntuuitoolkit.CheckBox, objectName='switcher')
6170 switcher.check()
62− pass
6371
6472 def unlock_rotation(self):
6573 """Toggles the rotation lock indicator to unlocked.
@@ -68,6 +76,6 @@ class DisplayIndicator (emulators.UnityEmulatorBase):
6876 to 'Off'.
6977
7078 """
71− switcher = self.select_single(ubuntuuitoolkit.CheckBox, objectName='switcher')
79+ switcher = self.select_single(
80+ ubuntuuitoolkit.CheckBox, objectName='switcher')
7281 switcher.uncheck()
73− pass