Skip to content

Commit

Permalink
test(citations): Add new test cases for citations
Browse files Browse the repository at this point in the history
  • Loading branch information
quevon24 committed Dec 19, 2024
1 parent 5d3cf67 commit 54b18eb
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/test_FindTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,15 @@ def test_find_citations(self):
# Long pin cite -- make sure no catastrophic backtracking in regex
('1 U.S. 1, 2277, 2278, 2279, 2280, 2281, 2282, 2283, 2284, 2286, 2287, 2288, 2289, 2290, 2291',
[case_citation(metadata={'pin_cite': '2277, 2278, 2279, 2280, 2281, 2282, 2283, 2284, 2286, 2287, 2288, 2289, 2290, 2291'})]),
# Test volume nominative reporter
("Ridgely's Notebook, 362",
[case_citation(volume=None, reporter="Ridgely's Notebook", groups={'volume': None, 'reporter': "Ridgely's Notebook", 'page': '362'})]),
# Test volume nominative reporter with right single quotation mark
('Bayard’s Notebook, 235',
[case_citation(volume=None, reporter="Bayard’s Notebook", groups={'volume': None, 'reporter': 'Bayard’s Notebook', 'page': '235'})]),
# Test citation with parallel citation in parentheses
('24 Del. (1 Boyce) 1',
[case_citation(reporter="Del.", groups={'volume': '24', 'reporter': 'Del.', 'parallel_volume': '1', 'reporter_nominative': 'Boyce', 'page': '1'})]),
)
# fmt: on
self.run_test_pairs(test_pairs, "Citation extraction")
Expand Down

0 comments on commit 54b18eb

Please sign in to comment.