2022-03-22 12:54:10 +01:00

20 lines
691 B
Python

# from os.path import join
# import json
# from vidocp.layout_parsing import parse_layout
# from vidocp.locations import TEST_DATA_DIR
# from vidocp.test.config import TEST_CONFIG
# from vidocp.utils.test_metrics import compute_document_score
# from vidocp.utils.preprocessing import open_pdf
# def test_figures():
# files = [f"file{i}" for i in range(10)]
# for file in files:
# cfg = TEST_CONFIG[file]
# with open(cfg.annotation):
# annotation = json.load()["figures"]
# pdf = open_pdf(join(TEST_DATA_DIR, cfg.path))
# result = parse_layout(pdf)["result"]["figures"]
# assert compute_document_score(annotation, result) >= 0.8