diff options
| author | Andrea Azzarone <azzaronea@gmail.com> | 2013-03-22 12:58:50 +0100 |
|---|---|---|
| committer | Andrea Azzarone <azzaronea@gmail.com> | 2013-03-22 12:58:50 +0100 |
| commit | fd3cb121f1e799c1265ef1f884b15ea9d5a0c980 (patch) | |
| tree | 6b3f9e37215e878bdbf812451bf2ae3b6d135989 /tests | |
| parent | 65c859b69f4d4f1b84b4ad1278c9a830ce739f58 (diff) | |
Fix failing AP tests.
(bzr r3244.1.3)
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/autopilot/unity/tests/launcher/test_icon_behavior.py | 1 | ||||
| -rw-r--r-- | tests/autopilot/unity/tests/launcher/test_tooltips.py | 8 |
2 files changed, 6 insertions, 3 deletions
diff --git a/tests/autopilot/unity/tests/launcher/test_icon_behavior.py b/tests/autopilot/unity/tests/launcher/test_icon_behavior.py index da6e38cae..0f03b2d0f 100644 --- a/tests/autopilot/unity/tests/launcher/test_icon_behavior.py +++ b/tests/autopilot/unity/tests/launcher/test_icon_behavior.py @@ -70,6 +70,7 @@ class LauncherIconsTests(LauncherTestCase): bfb = self.unity.launcher.model.get_bfb_icon() self.mouse.move(bfb.center_x, bfb.center_y) + self.assertThat(lambda: bfb.get_tooltip(), Eventually(NotEquals(None))) self.assertThat(bfb.get_tooltip().active, Eventually(Equals(True))) self.unity.dash.ensure_visible() self.addCleanup(self.unity.dash.ensure_hidden) diff --git a/tests/autopilot/unity/tests/launcher/test_tooltips.py b/tests/autopilot/unity/tests/launcher/test_tooltips.py index 09cd786e1..28d871aed 100644 --- a/tests/autopilot/unity/tests/launcher/test_tooltips.py +++ b/tests/autopilot/unity/tests/launcher/test_tooltips.py @@ -7,7 +7,7 @@ # by the Free Software Foundation. from autopilot.matchers import Eventually -from testtools.matchers import Equals +from testtools.matchers import Equals, NotEquals from time import sleep from unity.tests.launcher import LauncherTestCase, _make_scenarios @@ -37,8 +37,10 @@ class LauncherTooltipTests(LauncherTestCase): a, b = 0, 1 while b < len(self.icons): self.mouse.move(self.icons[b].center_x, self.icons[b].center_y) - self.assertTrue(self.icons[b].get_tooltip().active) - self.assertFalse(self.icons[a].get_tooltip().active) + self.assertThat(lambda: self.icons[b].get_tooltip(), Eventually(NotEquals(None))) + self.assertThat(self.icons[b].get_tooltip().active, Eventually(Equals(True))) + self.assertThat(lambda: self.icons[a].get_tooltip(), Eventually(NotEquals(None))) + self.assertThat(self.icons[a].get_tooltip().active, Eventually(Equals(False))) a, b = a + 1, b + 1 b -= 1 |
