Merge branch 'wip/smcv/skip-low-mem' into 'master'

tests: Skip MemoryMonitor test if GObject-Introspection is too old

See merge request GNOME/glib!1397
This commit is contained in:
Philip Withnall 2020-03-02 10:26:50 +00:00
commit b3b814f9c2
2 changed files with 12 additions and 0 deletions

View File

@ -38,6 +38,12 @@ class TestLowMemoryMonitor(dbusmock.DBusTestCase):
klass.dbus_con = klass.get_dbus(True)
def setUp(self):
try:
Gio.MemoryMonitor
except AttributeError:
raise unittest.SkipTest('Low memory monitor not in '
'introspection data. Requires '
'GObject-Introspection ≥ 1.63.2')
try:
(self.p_mock, self.obj_lmm) = self.spawn_server_template(
'low_memory_monitor', {}, stdout=subprocess.PIPE)

View File

@ -40,6 +40,12 @@ class TestLowMemoryMonitorPortal(dbusmock.DBusTestCase):
klass.start_session_bus()
def setUp(self):
try:
Gio.MemoryMonitor
except AttributeError:
raise unittest.SkipTest('Low memory monitor not in '
'introspection data. Requires '
'GObject-Introspection ≥ 1.63.2')
try:
(self.p_mock, self.obj_lmm) = self.spawn_server_template(
'low_memory_monitor', {}, stdout=subprocess.PIPE)