From 3e9bfac5cf9b2e09340e2c2c5b24a800925bcd60 Mon Sep 17 00:00:00 2001 From: Julius Unverfehrt Date: Mon, 21 Mar 2022 11:01:21 +0100 Subject: [PATCH] test --- test/unit_tests/test_predictor.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/unit_tests/test_predictor.py b/test/unit_tests/test_predictor.py index d35eb35..e74f9df 100644 --- a/test/unit_tests/test_predictor.py +++ b/test/unit_tests/test_predictor.py @@ -1,11 +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 = [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}} + predictions = [p for p in predictions][0] + assert predictions["class"] == "formula" + assert dict(**predictions["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