pytest_flakefighters.rerun_strategies
This module implements the various supported test rerun strategies.
Module Contents
Classes
Abstract base class for test rerun strategies. |
|
Rerun all tests, regardless of outcome. |
|
Strategy to rerun failed tests marked as flaky. |
|
Rerun failed tests marked as flaky and tests previously marked as flaky. |
- class pytest_flakefighters.rerun_strategies.RerunStrategy(max_reruns: int)
Bases:
abc.ABCAbstract base class for test rerun strategies.
- abstract rerun(report: pytest.TestReport) bool
Decide whether to rerun a test case. :return: Boolean true to rerun, False otherwise.
- abstract classmethod help() str
Return the help string for config options.
- class pytest_flakefighters.rerun_strategies.All(max_reruns: int)
Bases:
RerunStrategyRerun all tests, regardless of outcome.
- rerun(report: pytest.TestReport) bool
Trivially rerun all tests, regardless of outcome. :return: Boolean true to rerun, False otherwise.
- classmethod help()
Return the help string for config options.
- class pytest_flakefighters.rerun_strategies.FlakyFailure(max_reruns: int)
Bases:
RerunStrategyStrategy to rerun failed tests marked as flaky.
- rerun(report: pytest.TestReport) bool
- Returns:
Boolean true if a test fails and has been marked as flaky by live FlakeFighters.
- classmethod help()
Return the help string for config options.
- class pytest_flakefighters.rerun_strategies.PreviouslyFlaky(reruns: int, database: pytest_flakefighters.database_management.Database)
Bases:
FlakyFailureRerun failed tests marked as flaky and tests previously marked as flaky.
- rerun(report: pytest.TestReport) bool
- Returns:
Boolean true if a test is a flaky failure or has previously been marked as flaky and has the same name as the current test.
- classmethod help()
Return the help string for config options.