labgrid.pytestplugin package

Submodules

labgrid.pytestplugin.fixtures module

labgrid.pytestplugin.fixtures.pytest_addoption(parser)[source]
labgrid.pytestplugin.fixtures.env(request)[source]

Return the environment configured in the supplied configuration file. It contains the targets contained in the configuration file.

labgrid.pytestplugin.fixtures.target(env)[source]

Return the default target main configured in the supplied configuration file.

labgrid.pytestplugin.hooks module

labgrid.pytestplugin.hooks.pytest_configure(config)[source]
labgrid.pytestplugin.hooks.pytest_collection_modifyitems(config, items)[source]

This function matches function feature flags with those found in the environment and disables the item if no match is found

labgrid.pytestplugin.reporter module

class labgrid.pytestplugin.reporter.StepReporter(terminalreporter, *, rewrite=False)[source]

Bases: object

__init__(terminalreporter, *, rewrite=False)[source]
notify(event)[source]
pytest_runtest_logstart()[source]
pytest_runtest_logreport(report)[source]
__dict__ = mappingproxy({'__init__': <function StepReporter.__init__>, '__dict__': <attribute '__dict__' of 'StepReporter' objects>, 'notify': <function StepReporter.notify>, '_StepReporter__commit': <function StepReporter.__commit>, '_line_format': <function StepReporter._line_format>, '__module__': 'labgrid.pytestplugin.reporter', '__doc__': None, 'pytest_runtest_logstart': <function StepReporter.pytest_runtest_logstart>, '_StepReporter__merge_element': <function StepReporter.__merge_element>, '_StepReporter__reset': <function StepReporter.__reset>, '__weakref__': <attribute '__weakref__' of 'StepReporter' objects>, '_StepReporter__format_elements': <function StepReporter.__format_elements>, 'pytest_runtest_logreport': <function StepReporter.pytest_runtest_logreport>})
__module__ = 'labgrid.pytestplugin.reporter'
__weakref__

list of weak references to the object (if defined)

class labgrid.pytestplugin.reporter.ColoredStepReporter(terminalreporter, *, rewrite=False)[source]

Bases: labgrid.pytestplugin.reporter.StepReporter

EVENT_COLORS_DARK = {'cycle$|on$|off$': 246, 'expect$': 8, 'run': 10, 'state_': 51, 'transition$': 45}
EVENT_COLORS_LIGHT = {'cycle$|on$|off$': 8, 'expect$': 250, 'run': 10, 'state_': 51, 'transition$': 45}
__init__(terminalreporter, *, rewrite=False)[source]
__module__ = 'labgrid.pytestplugin.reporter'