Bluetoothctl#
- class pytest_bluezenv.Bluetoothctl(args=())[source]#
Host plugin for starting and controlling one
bluetoothctlprocess with pexpect.- Parameters:
args (
sequence) – extra command-line arguments forbluetoothctl.
Depends on
Bluetoothd.Example
@host_config([Bluetoothctl()]) def test_info(hosts): hosts[0].bluetoothctl.send("show\n")
Example
# Accept pairing and authorize services without prompting @host_config([Bluetoothctl(args=("-a", "auto:NoInputNoOutput"))]) def test_pair(hosts): ...
Methods
expect(*a[, reject])Wait for a pattern in the
bluetoothctloutput.expect_all(patterns[, reject, timeout])Wait for all the given patterns in the
bluetoothctloutput, in any order.presetup(config)Locate
bluetoothctlon the parent host (skip if absent).send(*a, **kw)Write a command to the
bluetoothctlprompt.setup(impl)Spawn
bluetoothctlunder pexpect (VM side).teardown()Close the
bluetoothctlprocess (VM side).