Пример #1
0
def parse(filename='example.html'):
    return hocr.parse(path.join(BASE_DIR, filename))
Пример #2
0
def test_parse_from_stream():
    with open(path.join(BASE_DIR, 'example.html'), 'rb') as stream:
        pages = hocr.parse(stream)

        assert len(pages) == len(parse('example.html'))