Files
manual_slop/tests/test_ai_context_history.py

26 lines
853 B
Python

import pytest
import tomli_w
from pathlib import Path
import aggregate
import project_manager
def test_aggregate_includes_segregated_history(tmp_path):
proj_path = tmp_path / "manual_slop.toml"
hist_path = tmp_path / "manual_slop_history.toml"
# Setup segregated project
proj_data = project_manager.default_project("test-aggregate")
proj_data["discussion"]["discussions"]["main"]["history"] = ["@2026-02-24T14:00:00\nUser:\nShow me history"]
# Save (will segregate)
project_manager.save_project(proj_data, proj_path)
# Run aggregate
loaded_proj = project_manager.load_project(proj_path)
config = project_manager.flat_config(loaded_proj)
markdown, output_file, file_items = aggregate.run(config)
assert "## Discussion History" in markdown
assert "Show me history" in markdown