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

Usage:

# imported directly (store is pytest.store)
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.

capturemanager
config = None

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

current_appliance
fixturemanager
has_config
in_pytest_session
my_ip_address
parallel_session
parallelizer_role = None

Parallelizer role, None if not running a parallelized session

pluginmanager
session = None

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

slave_manager
slaveid
ssh_clients_to_close = None

hack variable until we get a more sustainable solution

terminaldistreporter
terminalreporter
write_line(line, **kwargs)[source]
cfme.fixtures.pytest_store.pytest_namespace()[source]
cfme.fixtures.pytest_store.pytest_plugin_registered(manager)[source]
cfme.fixtures.pytest_store.pytest_sessionstart(session)[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.

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