Skip to content

Commit

Permalink
fix: unit-tests (#3)
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Staar <taa@zurich.ibm.com>
  • Loading branch information
PeterStaar-IBM authored Aug 6, 2024
1 parent ccb7675 commit fa7bef7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/test_parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ def test_reference_documents():
with open(pdf_doc+".json", "r") as fr:
true_doc = json.load(fr)

assert pred_doc["pages"]==true_doc["pages"], "pred_doc[\"pages\"]!=true_doc[\"pages\"]"
num_true_pages=len(true_doc["pages"])
num_pred_pages=len(pred_doc["pages"])

assert num_true_pages==num_pred_pages, f"len(pred_doc[\"pages\"])!=len(true_doc[\"pages\"]) => {num_true_pages}!={num_pred_pages}"

for pred_page,true_page in zip(pred_doc["pages"], true_doc["pages"]):

Expand Down

0 comments on commit fa7bef7

Please sign in to comment.