﻿# tests/test_report_generation.py
# STEP 3 Feature 2: Report generation testing
# Lines: 28 - Test: YES - Rollback: Remove-Item

import sys
import os
from pathlib import Path
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))

def test_report_generation():
    """Test report generation functionality"""
    try:
        from control_tower import ControlTower
        tower = ControlTower()
        
        # Generate report for sprint 1
        report_file = tower.report(1)
        
        # Verify report was created
        if report_file and Path(report_file).exists():
            with open(report_file, 'r') as f:
                content = f.read()
                assert "Sprint 1" in content
                assert "Control Tower Setup" in content
            print(f"EVIDENCE: Report generated at {report_file}")
            assert True  # Report test passed
        assert False, "Report test failed"
    except Exception as e:
        print(f"FAILED: {e}")
        assert False, "Report test failed"

if __name__ == "__main__":
    if test_report_generation():
        print("[PASS] Report generation test")

