mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-09 08:03:12 +02:00
Condition DBUS connectivity test on a single envvar
That way it will still run in the future if X goes away
This commit is contained in:
parent
4745bdabe3
commit
f9ef62a901
1 changed files with 2 additions and 4 deletions
|
|
@ -32,14 +32,12 @@ def test_dlls(self):
|
|||
@unittest.skipUnless(islinux, 'DBUS only used on linux')
|
||||
def test_dbus(self):
|
||||
import dbus
|
||||
bus = None
|
||||
if 'DISPLAY' in os.environ:
|
||||
if 'DBUS_SESSION_BUS_ADDRESS' in os.environ:
|
||||
bus = dbus.SystemBus()
|
||||
self.assertTrue(bus.list_names(), 'Failed to list names on the system bus')
|
||||
if 'DBUS_SESSION_BUS_ADDRESS' in os.environ:
|
||||
bus = dbus.SessionBus()
|
||||
self.assertTrue(bus.list_names(), 'Failed to list names on the session bus')
|
||||
del bus
|
||||
del bus
|
||||
|
||||
def test_regex(self):
|
||||
import regex
|
||||
|
|
|
|||
Loading…
Reference in a new issue