Skip to content

Commit 7b35cde

Browse files
committed
fix: install tesseract
1 parent 9f950da commit 7b35cde

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ language: python
22
python:
33
- "2.7"
44
install:
5+
- sudo apt-get install tesseract-ocr-eng
56
- python -m pip install --upgrade pip
67
- pip install --upgrade -r requirements.txt
78
script:

core/utils/run.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import logging
22
import os
3-
import time
4-
from datetime import datetime
53

64
import psutil
5+
import time
6+
from datetime import datetime
77

88
from core.base_test.test_context import TestContext
99
from core.log.log import Log
1010
from core.settings import Settings
11-
from core.utils.file_utils import File
11+
from core.utils.file_utils import File, Folder
1212
from core.utils.process_info import ProcessInfo
1313

1414
if os.name == 'posix' and Settings.PYTHON_VERSION < 3:
@@ -30,6 +30,10 @@ def run(cmd, cwd=Settings.TEST_RUN_HOME, wait=True, timeout=600, fail_safe=False
3030

3131
# Command settings
3232
if not wait:
33+
# Ensure folder exists
34+
dir_path = os.path.dirname(os.path.realpath(log_file))
35+
Folder.create(dir_path)
36+
# Redirect output to file
3337
File.write(path=log_file, text=cmd + os.linesep + '====>' + os.linesep)
3438
cmd = cmd + ' >> ' + log_file + ' 2>&1 &'
3539

core_tests/utils/image_tests.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ def test_03_get_main_color(self):
3535
actual_color = ImageUtils.get_main_color(image_path=self.app_image)
3636
assert (actual_color == self.white).all(), 'Main color is wrong. It should be white.'
3737

38-
@unittest.skip('Skip due to tesseract not installed on Travis CI.')
3938
def test_04_get_text(self):
4039
# OCR on Hello-World app
4140
text = ImageUtils.get_text(self.app_image)

0 commit comments

Comments
 (0)