MCPcopy Create free account
hub / github.com/Kaggle/docker-python / test_tesseract

Method test_tesseract

tests/test_pytesseract.py:9–15  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

7
8class TestPytesseract(unittest.TestCase):
9 def test_tesseract(self):
10 # Open pdf with Wand
11 with wandimage(filename='/input/tests/data/test.pdf') as wand_image:
12 img_buffer = np.asarray(bytearray(wand_image.make_blob(format='png')), dtype='uint8')
13 bytesio = io.BytesIO(img_buffer)
14 test_string = pytesseract.image_to_string(Image.open(bytesio))
15 self.assertTrue(type(test_string) == str)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected