diff --git a/gio/tests/memory-monitor-dbus.py.in b/gio/tests/memory-monitor-dbus.py.in index 43c6c63fd..675024a50 100755 --- a/gio/tests/memory-monitor-dbus.py.in +++ b/gio/tests/memory-monitor-dbus.py.in @@ -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) diff --git a/gio/tests/memory-monitor-portal.py.in b/gio/tests/memory-monitor-portal.py.in index 8572d8f69..37c206fd4 100755 --- a/gio/tests/memory-monitor-portal.py.in +++ b/gio/tests/memory-monitor-portal.py.in @@ -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)