mainloop_wrap#
- pytest_bluezenv.mainloop_wrap(func)[source]#
Wrap function to run in GLib main loop thread
- Parameters:
func (
callable) – function to wrap.- Returns:
wrapper that invokes
funcin the main loop and returns its value.- Return type:
callable
Note
GLib main loop is only available for VM host plugins, not in tester.
Example
@mainloop_wrap def func(): bus = get_dbus()