cfme.fixtures.pytest_store module

Storage for pytest objects during test runs

The objects in the module will change during the course of a test run, so they have been stashed into the ‘store’ namespace


# imported directly (store is
from cfme.fixtures.pytest_store import store
store.config, store.pluginmanager, store.session

The availability of these objects varies during a test run, but all should be available in the collection and testing phases of a test run.

class cfme.fixtures.pytest_store.FlexibleTerminalReporter(config=None, file=None)[source]

Bases: _pytest.terminal.TerminalReporter

A TerminalReporter stand-in that pretends to work even without a py.test config.

class cfme.fixtures.pytest_store.Store[source]

Bases: object

pytest object store

If a property isn’t available for any reason (including being accessed outside of a pytest run), it will be None.

property capturemanager
config = None

The py.test config instance, None if not in py.test

property current_appliance
property fixturemanager
property has_config
property in_pytest_session
property parallel_session
parallelizer_role = None

Parallelizer role, None if not running a parallelized session

property pluginmanager
session = None

The current py.test session, None if not in a py.test session

property slave_manager
property slaveid
ssh_clients_to_close = None

hack variable until we get a more sustainable solution

property terminaldistreporter
property terminalreporter
write_line(line, **kwargs)[source]
cfme.fixtures.pytest_store.write_line(line, **kwargs)[source]

A write-line helper that should always write a line to the terminal

It knows all of py.tests dirty tricks, including ones that we made, and works around them.


**kwargs – Normal kwargs for pytest line formatting, stripped from slave messages