Rename '--reg' flag to '--maintain' (#58)

pull/5155/head
merwanehamadi 2023-07-05 21:03:45 -07:00 committed by GitHub
parent 74fc969dd6
commit 7102fe1a18
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -106,3 +106,4 @@ jobs:
run: |
poetry install
poetry run agbenchmark start --mock
poetry run agbenchmark start --mock --maintain

View File

@ -25,9 +25,9 @@ def cli() -> None:
@cli.command()
@click.option("--category", default=None, help="Specific category to run")
@click.option("--reg", is_flag=True, help="Runs only regression tests")
@click.option("--maintain", is_flag=True, help="Runs only regression tests")
@click.option("--mock", is_flag=True, help="Run with mock")
def start(category: str, reg: bool, mock: bool) -> int:
def start(category: str, maintain: bool, mock: bool) -> int:
"""Start the benchmark tests. If a category flag is provided, run the categories with that mark."""
# Check if configuration file exists and is not empty
if not os.path.exists(CONFIG_PATH) or os.stat(CONFIG_PATH).st_size == 0:
@ -76,7 +76,7 @@ def start(category: str, reg: bool, mock: bool) -> int:
if category:
pytest_args.extend(["-m", category])
else:
if reg:
if maintain:
print("Running all regression tests")
tests_to_run = get_regression_tests()
else: