diff options
| author | Craig Jennings <c@cjennings.net> | 2026-05-11 07:32:34 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-05-11 07:32:34 -0500 |
| commit | 1a53381a176e99f5c7f9bed1589dbaf689f38390 (patch) | |
| tree | 8bf917604b30907a4a5ed5a66feb37d68c8e12d5 /scripts/coverage-summary.py | |
| parent | 1702bf7e2bd50e0be63642fddbd48c66e7b7ee77 (diff) | |
| download | org-drill-1a53381a176e99f5c7f9bed1589dbaf689f38390.tar.gz org-drill-1a53381a176e99f5c7f9bed1589dbaf689f38390.zip | |
test: fix date-sensitive days-since-creation assertion
test-org-drill-entry-days-since-creation-with-date-added pinned DATE_ADDED to a hardcoded 2026-04-01 and asserted 33-35 days, which only holds when the wall clock is near 2026-05-05. The with-fixed-now mock that was supposed to make it deterministic rebinds `current-time`. But the DATE_ADDED branch of org-drill-entry-days-since-creation goes through `org-time-stamp-to-now`, which reads the real clock. The rebind never reaches it. CI went red once the calendar moved past the +35-day window.
I rewrote the test to derive DATE_ADDED 34 calendar days before today (via decode-time / encode-time, so month rollover and DST are handled) and assert the function returns exactly 34. No mock needed. Both sides read the same real clock.
Diffstat (limited to 'scripts/coverage-summary.py')
0 files changed, 0 insertions, 0 deletions
