Merge lp:~maxb/bzr-dbus/test2 into lp:bzr-dbus

Proposed by Max Bowsher
Status: Merged
Approved by: Jelmer Vernooij
Approved revision: 47
Merged at revision: 47
Proposed branch: lp:~maxb/bzr-dbus/test2
Merge into: lp:bzr-dbus
Diff against target: 24 lines (+6/-1)
1 file modified
tests/test_activity.py (+6/-1)
To merge this branch: bzr merge lp:~maxb/bzr-dbus/test2
Reviewer Review Type Date Requested Status
Jelmer Vernooij (community) code Approve
Review via email: mp+49388@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Jelmer Vernooij (jelmer) :
review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/test_activity.py'
2--- tests/test_activity.py 2011-02-09 22:33:34 +0000
3+++ tests/test_activity.py 2011-02-11 13:17:53 +0000
4@@ -39,7 +39,7 @@
5 # by default.
6 dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
7
8-from bzrlib.tests import TestCaseWithMemoryTransport
9+from bzrlib.tests import TestCaseWithMemoryTransport, TestSkipped
10
11 import bzrlib.plugins.dbus
12 from bzrlib.plugins.dbus import activity
13@@ -167,6 +167,11 @@
14
15 def test_constructor(self):
16 """The constructor should setup a good working environment."""
17+ # This test appears to be written to specifically test connecting to an
18+ # externally available session bus, so skip it if no such bus exists
19+ # (e.g. on a buildd)
20+ if 'DBUS_SESSION_BUS_ADDRESS' not in os.environ:
21+ raise TestSkipped('No session bus available')
22 obj = activity.Activity()
23 # dbus uses a singleton approach for SessionBus, and we dont know if
24 # it has __eq__ or if it would be reliable, so we use object identity.

Subscribers

People subscribed via source and target branches

to all changes: