コード例 #1
0
ファイル: test_parse.py プロジェクト: movermeyer/python-hocr
def parse(filename='example.html'):
    return hocr.parse(path.join(BASE_DIR, filename))
コード例 #2
0
ファイル: test_parse.py プロジェクト: movermeyer/python-hocr
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'))