2023-09-28 09:37:44 +02:00
|
|
|
from typing import Any
|
|
|
|
|
|
|
|
|
|
|
|
def pytest_addoption(parser: Any) -> None:
|
2023-08-22 11:08:38 +02:00
|
|
|
"""
|
|
|
|
Add CLI options to `pytest` to pass those options to the test cases.
|
|
|
|
These options are used in `pytest_generate_tests`.
|
|
|
|
"""
|
|
|
|
parser.addoption("--use-old-replica-state", action="store_true", default=False)
|
|
|
|
|
|
|
|
|
2023-09-28 09:37:44 +02:00
|
|
|
def pytest_generate_tests(metafunc: Any) -> None:
|
2023-08-22 11:08:38 +02:00
|
|
|
metafunc.parametrize(
|
|
|
|
"use_old_replica_state", [metafunc.config.getoption("use_old_replica_state")]
|
|
|
|
)
|