#!/bin/bash # 测试运行脚本 set -e echo "Running tests for FunctionalScaffold..." # 激活虚拟环境(如果存在) if [ -d "venv" ]; then source venv/bin/activate fi # 运行代码检查 echo "Running code quality checks..." echo "- Checking with ruff..." ruff check src/ tests/ || true echo "- Checking formatting with black..." black --check src/ tests/ || true # 运行测试 echo "" echo "Running tests..." pytest tests/ -v --cov=src/functional_scaffold --cov-report=term --cov-report=html echo "" echo "Tests completed!" echo "Coverage report available at: htmlcov/index.html"