Add retention cli options frontend

This commit is contained in:
Yusuke Kadowaki 2022-10-23 01:03:40 +09:00
parent bc2c3b66aa
commit 30436777f6
1 changed files with 16 additions and 0 deletions

View File

@ -228,6 +228,22 @@ def pytest_addoption(parser: Parser) -> None:
), ),
) )
group.addoption(
"--tmp-path-retention-count",
dest="tmp_path_retention_count",
default=3,
metavar="num",
help="How many sessions should we keep the `tmp_path` directories, according to `tmp_path_retention_policy`.",
)
group.addoption(
"--tmp-path-retention-policy",
default="failed",
choices=["all", "failed", "none"],
dest="tmp_path_retention_policy",
help="Controls which directories created by the `tmp_path` fixture are kept around, based on test outcome.",
)
def validate_basetemp(path: str) -> str: def validate_basetemp(path: str) -> str:
# GH 7119 # GH 7119