Call#
- class pytest_bluezenv.Call[source]#
Host plugin providing
host.call(func, *args, **kw)interface.Loaded by default.
The
host.callobject is aProxythat invokes the given function on the VM host side.- Parameters:
func (
callable) – function to run on the VM host. It and its arguments must be picklable / importable on the VM.*args – positional arguments passed to
func.**kw – keyword arguments passed to
func; the extra keywordsync(default true) controls the return value.
- Returns:
the return value of
funcifsyncis true, else aResultProxywhosewait()returns it later.- Return type:
object
Example
result = host0.call(my_func, 1, 2, 3)
Example
result_async = host0.call(my_func, 1, 2, 3, sync=False) ... result = result_async.wait()
Methods
call_async(func, *a, **kw)Run
funcon the VM and remember the result forwait_async.presetup(config)Configure a plugin on the upper tester before VM hosts start.
setup(impl)Publish the call proxy as
host.call(VM side).teardown()Tear down a plugin in the VM host after its test instance.
wait_async(id_value)Return and forget the stored result of an asynchronous call.