From 5e5f5daba22518dd21091ea288800bc7c422631c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20R=C3=B6ggla?= <philip.roeggla@onb.ac.at> Date: Thu, 23 Jul 2020 15:40:31 +0200 Subject: [PATCH] add c subfield to Haupttitel ; Titelzusatz ; Verantwortlichkeitsangabe --- test/dataextractors/test_multiple.py | 7 +++---- .../dataextractors/dataextractors/combinedsubfields.py | 1 + 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/dataextractors/test_multiple.py b/test/dataextractors/test_multiple.py index fe3404a..190ad93 100644 --- a/test/dataextractors/test_multiple.py +++ b/test/dataextractors/test_multiple.py @@ -115,10 +115,10 @@ async def test_multiple_classes(): assert all([r.__class__ is str for r in reihe_band_list]) assert all([h.__class__ is str for h in haupttitel_etc_list]) assert len(reihe_band_list) == 2 - if record.ac_number == 'AC07705435': - assert len(haupttitel_etc_list) == 1 - else: + if record.ac_number in ['AC07705435', 'AC03826205', 'AC09792500', 'AC07705435', 'AC03115986']: assert len(haupttitel_etc_list) == 2 + else: + assert len(haupttitel_etc_list) == 3 if index < 2: assert reihe_band_list[1] == 'Erster Band' @@ -262,7 +262,6 @@ async def test_multiple_classes(): assert target_dataframe.at[record.ac_number, signatur.column][0].isdigit() - index += 1 if index == stop: break diff --git a/travelogues_extraction/dataextractors/dataextractors/combinedsubfields.py b/travelogues_extraction/dataextractors/dataextractors/combinedsubfields.py index f269aff..c8a1686 100644 --- a/travelogues_extraction/dataextractors/dataextractors/combinedsubfields.py +++ b/travelogues_extraction/dataextractors/dataextractors/combinedsubfields.py @@ -41,6 +41,7 @@ class HaupttitelTitelzusatzVerantwortlichkeitsangabe(AbstractMultifield): xpath_isgnd_tuples = ( VerfasserGND.xpath_isgnd_tuples[0], AbstractMultifield.XpathIsGnd(xpath=lxmletree.XPath('./marc:subfield[@code="b"]', namespaces=namespaces), isgnd=False), + VerfasserGND.xpath_isgnd_tuples[1], VerfasserGND.xpath_isgnd_tuples[2], ) -- GitLab