mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04: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
95a42eb768
commit
83ba85ef1b
@ -32,14 +32,12 @@ class BuildTest(unittest.TestCase):
|
||||
@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…
x
Reference in New Issue
Block a user