Skip to content

Commit 7744dbc

Browse files
grossirclaude
andcommitted
test: guard short cite path for relaxed reporter whitespace
Add a spaced short cite (N. Y. S. 2d) that exercises the separate short_cite_re path. Unlike the existing U. S. short cites, N.Y.S.2d has no whitespace variation in reporters-db, so it matches only via the relaxation -- and once those whitespace-only variations are removed (reporters-db #261) this becomes the only path for spaced short cites. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 7f3f13b commit 7744dbc

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

tests/test_FindTest.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -878,6 +878,18 @@ def test_relaxed_reporter_whitespace(self):
878878
('799 N.Y.S.2d 795',
879879
[case_citation(volume='799', page='795',
880880
reporter='N.Y.S.2d')]),
881+
# Short cite with a spaced reporter, which goes through the
882+
# separate short_cite_re path. "N. Y. S. 2d" is not a registered
883+
# variation, so it matches only via the whitespace relaxation --
884+
# unlike the "U. S." short cites elsewhere in this file, which
885+
# still pass through their reporters-db variation. Once those
886+
# whitespace-only variations are removed (reporters-db #261),
887+
# this relaxation becomes the only path for spaced short cites,
888+
# so guard that short_cite_re composes with it.
889+
('See Adarand, 799 N. Y. S. 2d, at 797',
890+
[case_citation(volume='799', page='797', reporter='N.Y.S.2d',
891+
reporter_found='N. Y. S. 2d', short=True,
892+
metadata={'antecedent_guess': 'Adarand'})]),
881893
)
882894
# fmt: on
883895
self.run_test_pairs(test_pairs, "Relaxed reporter whitespace")

0 commit comments

Comments
 (0)