Skip to content

Commit 54b18eb

Browse files
committed
test(citations): Add new test cases for citations
1 parent 5d3cf67 commit 54b18eb

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/test_FindTest.py

+9
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,15 @@ def test_find_citations(self):
475475
# Long pin cite -- make sure no catastrophic backtracking in regex
476476
('1 U.S. 1, 2277, 2278, 2279, 2280, 2281, 2282, 2283, 2284, 2286, 2287, 2288, 2289, 2290, 2291',
477477
[case_citation(metadata={'pin_cite': '2277, 2278, 2279, 2280, 2281, 2282, 2283, 2284, 2286, 2287, 2288, 2289, 2290, 2291'})]),
478+
# Test volume nominative reporter
479+
("Ridgely's Notebook, 362",
480+
[case_citation(volume=None, reporter="Ridgely's Notebook", groups={'volume': None, 'reporter': "Ridgely's Notebook", 'page': '362'})]),
481+
# Test volume nominative reporter with right single quotation mark
482+
('Bayard’s Notebook, 235',
483+
[case_citation(volume=None, reporter="Bayard’s Notebook", groups={'volume': None, 'reporter': 'Bayard’s Notebook', 'page': '235'})]),
484+
# Test citation with parallel citation in parentheses
485+
('24 Del. (1 Boyce) 1',
486+
[case_citation(reporter="Del.", groups={'volume': '24', 'reporter': 'Del.', 'parallel_volume': '1', 'reporter_nominative': 'Boyce', 'page': '1'})]),
478487
)
479488
# fmt: on
480489
self.run_test_pairs(test_pairs, "Citation extraction")

0 commit comments

Comments
 (0)