From 8f371e39ae321af0cf894a70afa7b75da96eab5f Mon Sep 17 00:00:00 2001 From: stumpylog <797416+stumpylog@users.noreply.github.com> Date: Thu, 20 Aug 2026 16:06:36 -0700 Subject: [PATCH] docs(test): state what the library now asserts about the 8-digit date form The docstring named test_compact_numeric_datetime as covering the 8-digit calendar-day form, but that test asserted only the lower bound, so the day-window property this file's deleted test_eight_digits_is_a_calendar_day_window used to pin was asserted in neither repo. whoosh-compat b672741 pins both bounds; this says so accurately rather than implying coverage that did not exist. "A library test covers this spelling" and "a library test asserts the property my deleted test asserted" are different claims, and only the second licenses a deletion. Co-Authored-By: Claude Opus 5 --- src/documents/tests/search/test_compact_date_forms.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/documents/tests/search/test_compact_date_forms.py b/src/documents/tests/search/test_compact_date_forms.py index 80ddacbd2..987994c15 100644 --- a/src/documents/tests/search/test_compact_date_forms.py +++ b/src/documents/tests/search/test_compact_date_forms.py @@ -1,9 +1,10 @@ """Whoosh's compact, separator-free date spelling, resolved end to end. -whoosh-compat owns both widths of this spelling and asserts them directly -(``test_compact_numeric_datetime`` for the 8-digit calendar-day form and -``test_compact_numeric_datetime_full_width_is_a_single_second_instant`` for -the 14-digit instant). The 14-digit form is kept here as the single +whoosh-compat owns both widths of this spelling and asserts both of each +form's bounds directly: ``test_compact_numeric_datetime`` pins the 8-digit +form as a whole calendar day (lower bound, upper bound and exclusivity), and +``test_compact_numeric_datetime_full_width_is_a_single_second_instant`` pins +the 14-digit form as one instant. The 14-digit form is kept here as the single representative because it is the one that exercises paperless's ``added`` DATETIME fast field at full precision: the corpus separates a document at the named instant from one on the same calendar day at another hour and one