The pytest-ruff plugin will run one ruff check test per file and fail if code is not ok for ruff. Format command only checks for format and fails for formatting errors.