mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Run the session bus test if the session bus env var is set
This commit is contained in:
parent
b9c1dbb33f
commit
4745bdabe3
@ -32,12 +32,14 @@ class BuildTest(unittest.TestCase):
|
|||||||
@unittest.skipUnless(islinux, 'DBUS only used on linux')
|
@unittest.skipUnless(islinux, 'DBUS only used on linux')
|
||||||
def test_dbus(self):
|
def test_dbus(self):
|
||||||
import dbus
|
import dbus
|
||||||
|
bus = None
|
||||||
if 'DISPLAY' in os.environ:
|
if 'DISPLAY' in os.environ:
|
||||||
bus = dbus.SystemBus()
|
bus = dbus.SystemBus()
|
||||||
self.assertTrue(bus.list_names(), 'Failed to list names on the system bus')
|
self.assertTrue(bus.list_names(), 'Failed to list names on the system bus')
|
||||||
|
if 'DBUS_SESSION_BUS_ADDRESS' in os.environ:
|
||||||
bus = dbus.SessionBus()
|
bus = dbus.SessionBus()
|
||||||
self.assertTrue(bus.list_names(), 'Failed to list names on the session bus')
|
self.assertTrue(bus.list_names(), 'Failed to list names on the session bus')
|
||||||
del bus
|
del bus
|
||||||
|
|
||||||
def test_regex(self):
|
def test_regex(self):
|
||||||
import regex
|
import regex
|
||||||
|
Loading…
x
Reference in New Issue
Block a user