| 3 | import easyocr |
| 4 | |
| 5 | class TestEasyOCR(unittest.TestCase): |
| 6 | def test_readtext(self): |
| 7 | # The model_storage_directory is only need in tests where we overwrite HOME=/tmp |
| 8 | reader = easyocr.Reader(['en'], gpu=False, model_storage_directory='/root/.EasyOCR/model') |
| 9 | result = reader.readtext('/input/tests/data/english.png', detail = 0) |
| 10 | # ['Reduce your risk of coronavirus infection:', 'Clean hands with soap and water', |
| 11 | # 'or alcohol based hand rub', 'Cover nose and mouth when coughing and', |
| 12 | # 'sneezing with tissue or flexed elbow', 'Avoid close contact with anyone with', |
| 13 | # 'cold or flu like symptoms', 'Thoroughly cook meat and eggs', |
| 14 | # 'No unprotected contact with live wild', 'or farm animals', 'World Health', 'Organization'] |
| 15 | self.assertEqual(len(result), 12) |
nothing calls this directly
no outgoing calls
no test coverage detected