Commit 4123726d authored by Jerome Flesch's avatar Jerome Flesch

Tesseract tests: Take into account that can_detect_orientation() now calls...

Tesseract tests: Take into account that can_detect_orientation() now calls get_available_languages()
Signed-off-by: Jerome Flesch's avatarJerome Flesch <jflesch@openpaper.work>
parent f30b16a8
Pipeline #82658 passed with stage
in 14 minutes and 20 seconds
......@@ -188,13 +188,21 @@ class TestTesseract(BaseTest):
get_available_languages.return_value = ['eng', 'fra', 'jpn']
self.assertFalse(tesseract.can_detect_orientation())
@patch("pyocr.tesseract.get_available_languages")
@patch("pyocr.tesseract.get_version")
def test_can_detect_orientation_tesseract3(self, get_version):
def test_can_detect_orientation_tesseract3(
self, get_version, get_available_languages
):
get_available_languages.return_value = ['eng', 'fra', 'jpn', 'osd']
get_version.return_value = (3, 3, 0)
self.assertTrue(tesseract.can_detect_orientation())
@patch("pyocr.tesseract.get_available_languages")
@patch("pyocr.tesseract.get_version")
def test_cannot_detect_orientation_tesseract3(self, get_version):
def test_cannot_detect_orientation_tesseract3(
self, get_version, get_available_languages
):
get_available_languages.return_value = ['eng', 'fra', 'jpn', 'osd']
get_version.return_value = (3, 2, 1)
self.assertFalse(tesseract.can_detect_orientation())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment