Merge lp:~thomir/autopilot-gtk/trunk-fix-deps into lp:autopilot-gtk

Proposed by Thomi Richards on 2013-09-27
Status: Merged
Approved by: Martin Pitt on 2013-09-27
Approved revision: 56
Merged at revision: 55
Proposed branch: lp:~thomir/autopilot-gtk/trunk-fix-deps
Merge into: lp:autopilot-gtk
Diff against target: 114 lines (+26/-11)
4 files modified
debian/control (+1/-1)
tests/autopilot/tests/test_actions.py (+18/-7)
tests/autopilot/tests/test_gnome_system_log.py (+1/-2)
tests/autopilot/tests/test_widget_tree.py (+6/-1)
To merge this branch: bzr merge lp:~thomir/autopilot-gtk/trunk-fix-deps
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve on 2013-09-27
Martin Pitt (community) 2013-09-27 Approve on 2013-09-27
Review via email: mp+187971@code.launchpad.net

Commit message

Update packaging details so upgrading from 1.3 -> 1.4 is seamless.

Description of the change

Update packaging details so upgrading from 1.3 -> 1.4 is seamless.

To post a comment you must log in.
Martin Pitt (pitti) wrote :

LGTM. I think the dependency is justified, as the module by itself doesn't make much sense.

review: Approve
56. By Thomi Richards on 2013-09-27

Fix failing autopilot tests.

Martin Pitt (pitti) wrote :

Not a big fan of assertThat(... raises), as that needs 4 lines of code where one is enough, but looks correct to me. Thanks!

review: Approve
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/control'
2--- debian/control 2013-09-17 13:46:19 +0000
3+++ debian/control 2013-09-27 06:14:33 +0000
4@@ -32,7 +32,7 @@
5 Pre-Depends: ${misc:Pre-Depends},
6 Depends: ${shlibs:Depends},
7 ${misc:Depends},
8-Breaks: python-autopilot (<< 1.4), python3-autopilot (<< 1.4)
9+ python-autopilot (>= 1.4) | python3-autopilot (>= 1.4),
10 Replaces: autopilot-gtk, libautopilot-gtk0, libautopilot-gtk-dev
11 Conflicts: autopilot-gtk, libautopilot-gtk0, libautopilot-gtk-dev
12 Provides: autopilot-gtk, libautopilot-gtk0
13
14=== modified file 'tests/autopilot/tests/test_actions.py'
15--- tests/autopilot/tests/test_actions.py 2013-06-27 06:52:52 +0000
16+++ tests/autopilot/tests/test_actions.py 2013-09-27 06:14:33 +0000
17@@ -18,8 +18,9 @@
18 import os
19
20 from autopilot.testcase import AutopilotTestCase
21+from autopilot.introspection.dbus import StateNotFoundError
22 from autopilot.matchers import Eventually
23-from testtools.matchers import Equals, NotEquals
24+from testtools.matchers import Equals, NotEquals, raises
25
26 tests_dir = os.path.dirname(os.path.dirname(os.path.dirname(
27 os.path.realpath(__file__))))
28@@ -56,7 +57,10 @@
29 self.assertThat(entry_color.text, Eventually(Equals('red')))
30
31 # should not have any dialogs
32- self.assertEqual(self.app.select_single('GtkMessageDialog'), None)
33+ self.assertThat(
34+ lambda: self.app.select_single('GtkMessageDialog'),
35+ raises(StateNotFoundError)
36+ )
37
38 # focus and activate the "Greet" button
39 self.keyboard.press_and_release('Tab')
40@@ -74,8 +78,10 @@
41
42 # close the dialog
43 self.keyboard.press_and_release('Enter')
44- self.assertThat(lambda: self.app.select_single('GtkMessageDialog', visible=True),
45- Eventually(Equals(None)))
46+ self.assertThat(
47+ lambda: self.app.select_single('GtkMessageDialog', visible=True),
48+ raises(StateNotFoundError)
49+ )
50
51 def test_greeting_mouse(self):
52 """Greeting with mouse navigation"""
53@@ -98,7 +104,10 @@
54 self.assertThat(entry_color.text, Eventually(Equals('blue')))
55
56 # should not have any dialogs
57- self.assertEqual(self.app.select_single('GtkMessageDialog'), None)
58+ self.assertThat(
59+ lambda: self.app.select_single('GtkMessageDialog'),
60+ raises(StateNotFoundError)
61+ )
62
63 # focus and activate the "Greet" button
64 btn = self.app.select_single('GtkButton', label='Greet')
65@@ -118,8 +127,10 @@
66 # close the dialog
67 btn = md.select_single('GtkButton', label='gtk-close')
68 self.mouse.click_object(btn)
69- self.assertThat(lambda: self.app.select_single('GtkMessageDialog', visible=True),
70- Eventually(Equals(None)))
71+ self.assertThat(
72+ lambda: self.app.select_single('GtkMessageDialog', visible=True),
73+ raises(StateNotFoundError)
74+ )
75
76 def test_clear(self):
77 """Using Clear button with mouse"""
78
79=== modified file 'tests/autopilot/tests/test_gnome_system_log.py'
80--- tests/autopilot/tests/test_gnome_system_log.py 2013-06-27 07:08:37 +0000
81+++ tests/autopilot/tests/test_gnome_system_log.py 2013-09-27 06:14:33 +0000
82@@ -63,5 +63,4 @@
83
84 # something that will not be in /etc/issue
85 self.keyboard.type('Bogus12!')
86- self.assertThat(lambda: self.app.select_single('GtkLabel', label=u'No matches found'),
87- Eventually(NotEquals(None)))
88+ self.app.wait_select_single('GtkLabel', label=u'No matches found')
89
90=== modified file 'tests/autopilot/tests/test_widget_tree.py'
91--- tests/autopilot/tests/test_widget_tree.py 2013-08-20 03:07:02 +0000
92+++ tests/autopilot/tests/test_widget_tree.py 2013-09-27 06:14:33 +0000
93@@ -17,7 +17,9 @@
94 import os.path
95 import unittest
96
97+from autopilot.introspection.dbus import StateNotFoundError
98 from autopilot.testcase import AutopilotTestCase
99+from testtools.matchers import raises
100
101 tests_dir = os.path.dirname(os.path.dirname(os.path.dirname(
102 os.path.realpath(__file__))))
103@@ -75,7 +77,10 @@
104
105 # we have no instances of these
106 for wtype in ('GtkTable', 'GtkRadioButton'):
107- self.assertIs(self.app.select_single(wtype), None)
108+ self.assertThat(
109+ lambda: self.app.select_single(wtype),
110+ raises(StateNotFoundError)
111+ )
112
113 # qualified: visible property is not unique
114 self.assertRaises(ValueError,

Subscribers

People subscribed via source and target branches