diff --git a/dev/breeze/src/airflow_breeze/commands/testing_commands.py b/dev/breeze/src/airflow_breeze/commands/testing_commands.py index c2b63ed378f92..a6aa6ef021ce2 100644 --- a/dev/breeze/src/airflow_breeze/commands/testing_commands.py +++ b/dev/breeze/src/airflow_breeze/commands/testing_commands.py @@ -249,9 +249,10 @@ def _run_test( pytest_args.extend(extra_pytest_args) # Skip "FOLDER" in case "--ignore=FOLDER" is passed as an argument # Which might be the case if we are ignoring some providers during compatibility checks + pytest_args_before_skip = pytest_args pytest_args = [arg for arg in pytest_args if f"--ignore={arg}" not in pytest_args] # If no test directory is left (all positional args were excluded/ignored), skip - if pytest_args and pytest_args[0].startswith("--"): + if pytest_args_before_skip != pytest_args and pytest_args[0].startswith("--"): return 0, f"Skipped test, no tests needed: {shell_params.test_type}" run_cmd.extend(pytest_args) try: