feat: 按自然月回补日报周报和月报

This commit is contained in:
Benature
2026-11-22 20:52:23 +08:00
parent 8f6831c3e8
commit 71fa22d1ba
8 changed files with 204 additions and 42 deletions

15
tests/test_monthly.py Normal file
View File

@ -0,0 +1,15 @@
from datetime import date
from snooper_monthly import load_previous_monthly_background
def test_previous_monthly_missing_only_applies_to_first_five_workdays(tmp_path):
output = {"monthly": str(tmp_path / "Monthly" / "MsgMYYYY-MM.md")}
content, missing = load_previous_monthly_background(output, date(2024, 11, 1))
assert content is None
assert missing is True
content, missing = load_previous_monthly_background(output, date(2024, 11, 27))
assert content is None
assert missing is False