From f4c0fe857036d1426b7a89a42d491e1749ac6f1d Mon Sep 17 00:00:00 2001 From: "Gerber, Mike" Date: Tue, 9 Feb 2021 18:29:49 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20small=20merge=20merge=20er?= =?UTF-8?q?ror=20(text=20not=20checked=20in=20test=5Frecognize=5Fshould=5F?= =?UTF-8?q?warn=5Fif=5Fgiven=5Frgb=5Fimage=5Fand=5Fsingle=5Fchannel=5Fmode?= =?UTF-8?q?l)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/test_recognize.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/test/test_recognize.py b/test/test_recognize.py index b3e8540..fdb2679 100644 --- a/test/test_recognize.py +++ b/test/test_recognize.py @@ -95,8 +95,8 @@ def test_recognize_with_checkpoint_dir(workspace): page1 = os.path.join(workspace.directory, "OCR-D-OCR-CALAMARI/OCR-D-OCR-CALAMARI_0001.xml") assert os.path.exists(page1) - with open(page1, 'r', encoding='utf-8') as f: - assert 'verſchuldeten' in f.read() + with open(page1, "r", encoding="utf-8") as f: + assert "verſchuldeten" in f.read() def test_recognize_should_warn_if_given_rgb_image_and_single_channel_model(workspace, caplog): @@ -110,8 +110,6 @@ def test_recognize_should_warn_if_given_rgb_image_and_single_channel_model(works interesting_log_messages = [t[2] for t in caplog.record_tuples if "Using raw image" in t[2]] assert len(interesting_log_messages) > 10 # For every line! - with open(page1, "r", encoding="utf-8") as f: - assert "verſchuldeten" in f.read() def test_word_segmentation(workspace):