Skip to content

Commit

Permalink
remove imageFilename attrib from CLI test
Browse files Browse the repository at this point in the history
  • Loading branch information
rue-a committed Jan 15, 2024
1 parent a661e19 commit c97c96a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ test-api:
$(PYTHON) -m pytest $(PYTEST_ARGS) tests

test-cli: OUT != mktemp -u
test-cli: UNDATED := xmlstarlet ed -N pc=http://schema.primaresearch.org/PAGE/gts/pagecontent/2019-07-15 -d /pc:PcGts/pc:Metadata/*
test-cli: UNDATED := xmlstarlet ed -N pc=http://schema.primaresearch.org/PAGE/gts/pagecontent/2019-07-15 -d /pc:PcGts/pc:Metadata/* -d "/pc:PcGts/pc:Page/@imageFilename"
test-cli:
cd tests/workspace; textract2page -O $(OUT) textract_responses/18xx-Missio-EMU-0042.json images/18xx-Missio-EMU-0042.jpg
if command -v xmlstarlet &> /dev/null; then diff -u <($(UNDATED) tests/workspace/reference_page_xml/18xx-Missio-EMU-0042.xml) <($(UNDATED) $(OUT)); fi
Expand Down
4 changes: 2 additions & 2 deletions tests/test_workspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ def test_api(self):
# remove img path from Page element

res_img_path_elem = result_tree.find(
".//pc:Page",
"pc:Page",
namespaces={
"pc": "http://schema.primaresearch.org/PAGE/gts/pagecontent/2019-07-15"
},
)
del res_img_path_elem.attrib["imageFilename"]
tar_img_path_elem = target_tree.find(
".//pc:Page",
"pc:Page",
namespaces={
"pc": "http://schema.primaresearch.org/PAGE/gts/pagecontent/2019-07-15"
},
Expand Down

0 comments on commit c97c96a

Please sign in to comment.