Collectors

Collectors represent the stage that converts the information on the connection mechanism into frames that can be translated into unit tests. For typical implementations, this may include a serial line which is hooked up to the standard human readable testing output.

For specialised applications, the unit test output may be in binary format. It is up to the collector to define its own encoding and data type.

class pyetta.collectors.Collector

Pyetta collector class, provides a small abstraction to allow for the collection of data.

Note

Timeouts if relevant should be handled by the constructor,

abstract read_chunk() bytes

Reads a chunk of data.

A chunk is defined as a single continuous piece that a parser can use to extract one of more tests from. Each chunk should have a whole piece of data.

Implementations

The pyetta library comes with some default collectors to capture output from devices.

class pyetta.collectors.IOBaseCollector(io_base: IO)

Bases: pyetta.collectors.Collector

Base helper wrapping class that covers all base IO collectors.

__init__(io_base: IO)
read_chunk() bytes

Reads a chunk of data.

A chunk is defined as a single continuous piece that a parser can use to extract one of more tests from. Each chunk should have a whole piece of data.