Call#

class pytest_bluezenv.Call[source]#

Host plugin providing host.call(func, *args, **kw) interface.

Loaded by default.

The host.call object is a Proxy that 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 keyword sync (default true) controls the return value.

Returns:

the return value of func if sync is true, else a ResultProxy whose wait() 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()
__init__()[source]#

Configure a plugin on the upper tester at collection time.

Methods

call_async(func, *a, **kw)

Run func on the VM and remember the result for wait_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.