Skip to content

Commit 70d1411

Browse files
authored
Open sourced test of encode_id (#1030)
1 parent 7e87161 commit 70d1411

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/test_paperqa.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,14 @@ async def fixture_docs_fixture(stub_data_dir: Path) -> Docs:
7676
return docs
7777

7878

79+
def test_encode_id() -> None:
80+
assert (
81+
encode_id("10.1056/nejmoa2119451")
82+
== encode_id("10.1056/NEJMOA2119451")
83+
== "945f1f30b11bcae6"
84+
)
85+
86+
7987
def test_single_author() -> None:
8088
text = "This was first proposed by (Smith 1999)."
8189
assert strip_citations(text) == "This was first proposed by ."

0 commit comments

Comments
 (0)