| 123456789101112 |
- import pandas as pd
- from data_query_agent.reports import build_profile, write_result_files
- def test_empty_result_still_creates_publishable_workbook(tmp_path) -> None:
- frame = pd.DataFrame(columns=["date", "dau"])
- csv_path, xlsx_path = write_result_files(tmp_path, frame, "SELECT 1", {"run_id": "r1"})
- assert csv_path.stat().st_size > 0
- assert xlsx_path.stat().st_size > 0
- assert build_profile(frame, False)["returned_rows"] == 0
|