parametrized_host_config#
- pytest_bluezenv.parametrized_host_config(param_host_setups, hw=False, mem=None, controller=True, ids=None, reuse=False)[source]#
Declare parametrized host configurations.
See https://docs.pytest.org/en/stable/how-to/parametrize.html for the concept.
- Parameters:
param_host_setups (
list) – list of host setupshw (
bool) – whether to require hardware BT controllermem (
str) – amount of memory for the VM instancescontroller (
bool) – whether to add controller to the hostids (
sequence) – parameter IDs. Default: generated setup names.reuse (
bool) – whether to define a setup where the test host processes are not required to be torn down between tests. This is only useful for tests that do not perturb e.g. bluetoothd state too much.
- Returns:
decorator setting pytest attributes
- Return type:
callable
Example
bredr = [Bluetoothd()] le = [Bluetoothd(conf="[General]\nControllerMode = le")] @parametrized_host_config( [[bredr], [le]], ids=["bredr", "le"], ) def test_pairing_mode(hosts): ...