from __future__ import annotations

import argparse
import json

from auto_test_init import clear_environment


def main() -> int:
    parser = argparse.ArgumentParser(description="单独清空自动测试环境")
    parser.add_argument(
        "--config",
        default="tests/fixtures/auto_sync/auto_test_config.yaml",
        help="自动测试配置文件路径",
    )
    args = parser.parse_args()

    result = clear_environment(args.config)
    print(json.dumps(result, ensure_ascii=False, indent=2))
    return 0


if __name__ == "__main__":
    raise SystemExit(main())