pytest_flakefighters.main

This module adds all the FlakeFighter configuration options to pytest.

Module Contents

Functions

rerun_strategy(strategy, max_reruns, **kwargs)

Instantiate the selected rerun strategy.

pytest_addoption(parser)

Add extra pytest options.

get_config_value(config, name)

Get the configuration value.

setup_flakefighter_configs(flakefighter_configs)

Parse the flakefighter configurations from string, or initialise to empty if None.

pytest_configure(config)

Initialise the FlakeFighterPlugin class.

Attributes

rerun_strategies

logger

pytest_flakefighters.main.rerun_strategies
pytest_flakefighters.main.logger
pytest_flakefighters.main.rerun_strategy(strategy: str, max_reruns: int, **kwargs)

Instantiate the selected rerun strategy.

pytest_flakefighters.main.pytest_addoption(parser: pytest.Parser)

Add extra pytest options. :param parser: The argument parser.

pytest_flakefighters.main.get_config_value(config, name)

Get the configuration value. Options specified on the commandline will override those specified in configuration files. If neither is specified, the default value specified in options.py will be used.

pytest_flakefighters.main.setup_flakefighter_configs(flakefighter_configs: Any)

Parse the flakefighter configurations from string, or initialise to empty if None. :param flakefighter_configs: The flakefighter config object.

pytest_flakefighters.main.pytest_configure(config: pytest.Config)

Initialise the FlakeFighterPlugin class. :param config: The config options.