pytest_bluezenv.LogStream#
- class pytest_bluezenv.LogStream(name, pattern=None, tee=None, stream=None)[source]#
Logger that forwards input from a stream to logging, and optionally tees to another stream. The input pipe is in LogStream.stream.
Example
from pytest_bluezenv import LogStream log_stream = LogStream("bluetoothctl") subprocess.run(["bluetoothctl", "show"], stdout=log_stream.stream)
Methods
__init__(name[, pattern, tee, stream])close([flush])Attributes
- LOG_QUEUE = <_queue.SimpleQueue object>
- LOG_THREAD = None
- LOG_THREAD_LOCK = <unlocked _thread.lock object>
- TS_STRUCT = <_struct.Struct object>