mirror of
https://gitlab.freedesktop.org/upower/upower.git
synced 2025-12-20 04:20:04 +01:00
linux: Add wait_for_mainloop() test helper
This commit is contained in:
parent
faa5a560f9
commit
4d3d8759db
1 changed files with 5 additions and 0 deletions
|
|
@ -324,6 +324,11 @@ class Tests(dbusmock.DBusTestCase):
|
|||
else:
|
||||
self.fail(message or 'timed out waiting for ' + str(condition))
|
||||
|
||||
def wait_for_mainloop(self):
|
||||
ml = GLib.MainLoop()
|
||||
GLib.timeout_add(100, ml.quit)
|
||||
ml.run()
|
||||
|
||||
#
|
||||
# Actual test cases
|
||||
#
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue