#!/bin/bash # run_tests.sh # Check if virtual environment exists if [ ! -d "venv" ]; then echo "Virtual environment not found. Setting up..." ./setup_test_env.sh fi # Activate the virtual environment source venv/bin/activate # Run tests with coverage echo "Running tests with coverage..." coverage erase # Clear any previous coverage data python -m pytest tests/ --cov=. --cov-config=.coveragerc -v # Generate HTML coverage report echo "Generating HTML coverage report..." coverage html echo "Coverage report generated in htmlcov/ directory" # Deactivate virtual environment deactivate