diff --git a/tests/client_test.py b/tests/client_test.py index e6eb6e4..9f77ac5 100644 --- a/tests/client_test.py +++ b/tests/client_test.py @@ -46,6 +46,7 @@ def test_whisper(client, data_dir, processing_mode, output_mode, input_file): exp_basename = f"{Path(input_file).stem}.{processing_mode}.{output_mode}.txt" exp_file = os.path.join(data_dir, "expected", exp_basename) + assert_extracted_text(exp_file, whisper_result, processing_mode, output_mode) diff --git a/tests/test_data/expected/handwritten-form.ocr.line-printer.txt b/tests/test_data/expected/handwritten-form.ocr.line-printer.txt index 26b7383..c7e5269 100644 --- a/tests/test_data/expected/handwritten-form.ocr.line-printer.txt +++ b/tests/test_data/expected/handwritten-form.ocr.line-printer.txt @@ -1,25 +1,35 @@ -Name STEPHEN YOUNG -Address 123 MAIN ST. +Name STEPHEN YOUNG -Are you: [ ] Married [X] Single -How did you hear about us? + Address 123 MAIN ST. -[ ] Search Ad -[ ] Facebook -[ ] X (formerly Twitter) -[ ] This mailer -[X] Other (Explain) SAW THE SIGN WHEN THE LOCATION - WAS BEING BUILT + Are you: [ ] Married [X] Single -By signing, I agree to receive all communications from acme, inc. -Signature + How did you hear about us? - 10/15/23 -Date + + [ ] Search Ad + [ ] Facebook + [ ] X (formerly Twitter) + [ ] This mailer + [X] Other (Explain) SAW THE SIGN WHEN THE LOCATION + + + WAS BEING BUILT + + + By signing, I agree to receive all communications from acme, inc. + + + Signature + + + 10/15/23 + Date <<< + diff --git a/tests/test_data/expected/restaurant_invoice_photo.ocr.line-printer.txt b/tests/test_data/expected/restaurant_invoice_photo.ocr.line-printer.txt index d2d18c7..d65f20c 100644 --- a/tests/test_data/expected/restaurant_invoice_photo.ocr.line-printer.txt +++ b/tests/test_data/expected/restaurant_invoice_photo.ocr.line-printer.txt @@ -1,43 +1,59 @@ - BURGER SEIGNEUR - No. 35, 80 feet road, + BURGER SEIGNEUR + + + No.35, 80 feet road, HAL 3rd Stage, Indiranagar, Bangalore - GST: 29AAHFL9534H1ZV + GST: 29AAHFL9534H1ZV + + + Order Number : T2- 57 - Order Number : T2- 57 - Type : Table + Type : Table - Table Number : 2 - Bill No .: T2 -- 126653 + Table Number: 2 + + + Bill No .: T2 -- 126653 Date:2023-05-31 23:16:50 Kots:63 + Item Qty Amt + Jack The + + Ripper 1 400.00 Plain Fries + Coke 300 ML 1 130.00 + Total Qty: 2 SubTotal: 530.00 -GST@5% 26.50 - CGST @2.5%. 13.25 + + GST@5% 26.50 + CGST @2.5% 13.25 SGST @2.5% 13.25 -Round Off : 0.50 -Total Invoice Value: 557 + Round Off: 0.50 + Total Invoice Value: 557 + PAY: 557 -Thank you, visit again! + + Thank you, visit again! + Powered by - POSIST <<< + diff --git a/tests/test_data/expected/restaurant_invoice_photo.text.line-printer.txt b/tests/test_data/expected/restaurant_invoice_photo.text.line-printer.txt index d2d18c7..d65f20c 100644 --- a/tests/test_data/expected/restaurant_invoice_photo.text.line-printer.txt +++ b/tests/test_data/expected/restaurant_invoice_photo.text.line-printer.txt @@ -1,43 +1,59 @@ - BURGER SEIGNEUR - No. 35, 80 feet road, + BURGER SEIGNEUR + + + No.35, 80 feet road, HAL 3rd Stage, Indiranagar, Bangalore - GST: 29AAHFL9534H1ZV + GST: 29AAHFL9534H1ZV + + + Order Number : T2- 57 - Order Number : T2- 57 - Type : Table + Type : Table - Table Number : 2 - Bill No .: T2 -- 126653 + Table Number: 2 + + + Bill No .: T2 -- 126653 Date:2023-05-31 23:16:50 Kots:63 + Item Qty Amt + Jack The + + Ripper 1 400.00 Plain Fries + Coke 300 ML 1 130.00 + Total Qty: 2 SubTotal: 530.00 -GST@5% 26.50 - CGST @2.5%. 13.25 + + GST@5% 26.50 + CGST @2.5% 13.25 SGST @2.5% 13.25 -Round Off : 0.50 -Total Invoice Value: 557 + Round Off: 0.50 + Total Invoice Value: 557 + PAY: 557 -Thank you, visit again! + + Thank you, visit again! + Powered by - POSIST <<< +