aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2021-11-03 20:05:39 -0700
committerBryan Newbold <bnewbold@archive.org>2021-11-03 20:05:39 -0700
commitc6daa0aa2d91666308996c4aab8868389e4aafc6 (patch)
treec28d32da157760ead18718bbf7f8c18337b363a0 /tests
parent8c7fcc943bc217bf456362b9e205910623974fd0 (diff)
downloadgrobid_tei_xml-c6daa0aa2d91666308996c4aab8868389e4aafc6.tar.gz
grobid_tei_xml-c6daa0aa2d91666308996c4aab8868389e4aafc6.zip
improve author and editor parsing
Diffstat (limited to 'tests')
-rw-r--r--tests/test_parse.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/test_parse.py b/tests/test_parse.py
index 32d7ea9..203c960 100644
--- a/tests/test_parse.py
+++ b/tests/test_parse.py
@@ -387,8 +387,11 @@ def test_citation_list_utf8() -> None:
assert ref_str.first_page == "155"
assert ref_str.pages == "155-172"
+
def test_citation_multiple_editors() -> None:
- with open("tests/files/citation/single_editor_multiple_persname.grobid070.tei.xml", "r") as f:
+ with open(
+ "tests/files/citation/single_editor_multiple_persname.grobid070.tei.xml", "r"
+ ) as f:
tei_xml = f.read()
ref = parse_citation_xml(tei_xml)
@@ -398,11 +401,12 @@ def test_citation_multiple_editors() -> None:
assert ref.authors[0].full_name == "J R Lurain"
assert ref.authors[0].middle_name == "R"
assert ref.authors[0].surname == "Lurain"
+ assert ref.editors
assert len(ref.editors) == 3
assert ref.editors[0].full_name == "J S Berek"
assert ref.editors[1].full_name == "E Y Adashi"
assert ref.editors[2].full_name == "P A Hillard"
- assert ref.journal == "Novak’s gynecology"
+ assert ref.book_title == "Novak’s gynecology"
assert ref.publisher == "Williams and Wilkins"
assert ref.date == "1996"
assert ref.note == "12th ed. Baltimore"