示例#1
0
def test_open_pdf(graph):
    page = graph.pages[0]
    Object._parse_stream(page.obj, PrintParser())
示例#2
0
def test_parser_exception(resources):
    pdf = Pdf.open(resources / 'graph.pdf')
    stream = pdf.pages[0]['/Contents']
    with pytest.raises(ValueError):
        Object._parse_stream(stream, ExceptionParser())
示例#3
0
def test_parser_exception(graph):
    stream = graph.pages[0]['/Contents']
    with pytest.raises(ValueError):
        Object._parse_stream(stream, ExceptionParser())
示例#4
0
def test_open_pdf(resources):
    pdf = Pdf.open(resources / 'graph.pdf')
    page = pdf.pages[0]
    Object._parse_stream(page, PrintParser())