feat: 按自然月回补日报周报和月报
This commit is contained in:
15
tests/test_monthly.py
Normal file
15
tests/test_monthly.py
Normal 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
|
||||
Reference in New Issue
Block a user