pytest_bluezenv.mainloop_invoke#

pytest_bluezenv.mainloop_invoke(func, *a, **kw)[source]#

Blocking invoke of func in GLib main loop.

Note

GLib main loop is only available for VM host plugins, not in tester.

Example

value = mainloop_invoke(lambda: 123)
assert value == 123

Warning

dbus-python MUST be used only from the GLib main loop, as the library has concurrency bugs. All functions using it MUST either run from GLib main loop eg. via mainloop_wrap