summaryrefslogtreecommitdiff
diff options
authorThomi Richards <thomi.richards@canonical.com>2012-02-07 14:57:09 +1300
committerThomi Richards <thomi.richards@canonical.com>2012-02-07 14:57:09 +1300
commit07b2f8209e88b6efece47b848cff2b1758587431 (patch)
tree475f71ee46840bc48251e77e3eca9ea83abab404
parent3540cd4021017504a041dd8efc3232cba2f82e01 (diff)
PEP8 fixed, removed debuging code.
(bzr r1882.2.17)
-rw-r--r--tests/autopilot/autopilot/emulators/unity.py10
-rw-r--r--tests/autopilot/autopilot/tests/test_invisible_windows.py1
2 files changed, 5 insertions, 6 deletions
diff --git a/tests/autopilot/autopilot/emulators/unity.py b/tests/autopilot/autopilot/emulators/unity.py
index ba0a5ec20..df4b993be 100644
--- a/tests/autopilot/autopilot/emulators/unity.py
+++ b/tests/autopilot/autopilot/emulators/unity.py
@@ -135,11 +135,11 @@ def make_launcher_icon(dbus_tuple):
name,state = dbus_tuple
try:
class_type = _icon_type_registry[name]
- return class_type(state)
except KeyError:
- import pdb; pdb.set_trace()
print name, "is not a valid icon type!"
return None
+ return class_type(state)
+
class Launcher(Unity):
"""Interact with the unity Launcher."""
@@ -368,8 +368,6 @@ class Quicklist(Unity):
self._mouse.click()
-
-
class QuicklistMenuItem(Unity):
"""Represents a single item in a quicklist."""
def __init__(self, state_dict):
@@ -393,11 +391,12 @@ class QuicklistMenuItemLabel(QuicklistMenuItem):
def _set_properties(self, state_dict):
super(QuicklistMenuItemLabel, self)._set_properties(state_dict)
self.text = state_dict['text']
- print "text = ", self.text
+
class QuicklistMenuItemSeparator(QuicklistMenuItem):
"""Represents a separator in a quicklist."""
+
class Switcher(Unity):
"""Interact with the Unity switcher."""
@@ -499,6 +498,7 @@ class Switcher(Unity):
def __get_controller(self):
return self.set_state('/unity/SwitcherController')[0]
+
class Dash(Unity):
"""
An emulator class that makes it easier to interact with the unity dash.
diff --git a/tests/autopilot/autopilot/tests/test_invisible_windows.py b/tests/autopilot/autopilot/tests/test_invisible_windows.py
index bd7b88a20..307d765a4 100644
--- a/tests/autopilot/autopilot/tests/test_invisible_windows.py
+++ b/tests/autopilot/autopilot/tests/test_invisible_windows.py
@@ -40,7 +40,6 @@ class InvisibleWindowTests(TestCase):
self.assertIn('Calculator', icon_names)
switcher.initiate()
- sleep(1)
icon_names = [i.tooltip_text for i in switcher.get_switcher_icons() if i.visible]
switcher.terminate()
self.assertIn('Calculator', icon_names)