From 3d9c4d8856522cc2a22b2a7b9ea64d34629eb2c1 Mon Sep 17 00:00:00 2001 From: Julius Unverfehrt Date: Mon, 21 Mar 2022 10:57:03 +0100 Subject: [PATCH] change test --- test/unit_tests/test_predictor.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/test/unit_tests/test_predictor.py b/test/unit_tests/test_predictor.py index 707c9a2..d35eb35 100644 --- a/test/unit_tests/test_predictor.py +++ b/test/unit_tests/test_predictor.py @@ -1,12 +1,11 @@ def test_predict_pdf_works(predictor, test_pdf): # FIXME strange outputs, with '\n's in the dict predictions, metadata = predictor.predict_pdf(test_pdf) - predictions = list(predictions) - predictions = dict(**predictions[0]) - assert predictions == {'class': 'formula', - 'probabilities': {'formula': 1.0, 'other': 1.576210689757148e-17, - 'signature': 5.364939675629517e-24, - 'logo': 8.815339177836606e-25}} + predictions = [p for p in predictions] + assert predictions[0] == {'class': 'formula', + 'probabilities': {'formula': 1.0, 'other': 1.576210689757148e-17, + 'signature': 5.364939675629517e-24, + 'logo': 8.815339177836606e-25}} metadata = list(metadata) metadata = dict(**metadata[0]) metadata.pop("document_filename") # temp filename cannot be tested