Commit 08145c0c authored by Jerome Flesch's avatar Jerome Flesch

Update tests for Tesseract 3.04

Signed-off-by: Jerome Flesch's avatarJerome Flesch <jflesch@gmail.com>
parent d7ed9533
PhraSe en français.
Phrae en français.
Avec des accents.
Ephémère
......@@ -27,8 +27,9 @@ class TestContext(unittest.TestCase):
(3, 2, 1),
(3, 2, 2),
(3, 3, 0),
(3, 4, 0),
), ("Tesseract does not have the expected version"
" (3.3.0) ! Some tests will be skipped !"))
" (3.4.0) ! Some tests will be skipped !"))
def test_langs(self):
langs = tesseract.get_available_languages()
......@@ -72,19 +73,9 @@ class TestTxt(unittest.TestCase):
def test_basic(self):
self.__test_txt('test.png', 'test.txt')
@unittest.skipIf(tesseract.get_version() not in (
(3, 2, 1),
(3, 2, 2),
(3, 3, 0),
), "This test only works with Tesseract 3.02.1")
def test_european(self):
self.__test_txt('test-european.jpg', 'test-european.txt')
@unittest.skipIf(tesseract.get_version() not in (
(3, 2, 1),
(3, 2, 2),
(3, 3, 0),
), "This test only works with Tesseract 3.02.1")
def test_french(self):
self.__test_txt('test-french.jpg', 'test-french.txt', 'fra')
......@@ -129,11 +120,6 @@ class TestCharBox(unittest.TestCase):
def test_french(self):
self.__test_txt('test-french.jpg', 'test-french.box', 'fra')
@unittest.skipIf(tesseract.get_version() not in (
(3, 2, 1),
(3, 2, 2),
(3, 3, 0),
), "This test requires Tesseract 3.02.1")
def test_japanese(self):
self.__test_txt('test-japanese.jpg', 'test-japanese.box', 'jpn')
......@@ -233,11 +219,6 @@ class TestWordBox(unittest.TestCase):
def test_french(self):
self.__test_txt('test-french.jpg', 'test-french.words', 'fra')
@unittest.skipIf(tesseract.get_version() not in (
(3, 2, 1),
(3, 2, 2),
(3, 3, 0),
), "This test requires Tesseract 3.02.1")
def test_japanese(self):
self.__test_txt('test-japanese.jpg', 'test-japanese.words', 'jpn')
......@@ -304,11 +285,6 @@ class TestLineBox(unittest.TestCase):
def test_french(self):
self.__test_txt('test-french.jpg', 'test-french.lines', 'fra')
@unittest.skipIf(tesseract.get_version() not in (
(3, 2, 1),
(3, 2, 2),
(3, 3, 0),
), "This test requires Tesseract 3.02.1")
def test_japanese(self):
self.__test_txt('test-japanese.jpg', 'test-japanese.lines', 'jpn')
......
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