def test_open_pdf(graph): page = graph.pages[0] Object._parse_stream(page.obj, PrintParser())
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())
def test_parser_exception(graph): stream = graph.pages[0]['/Contents'] with pytest.raises(ValueError): Object._parse_stream(stream, ExceptionParser())
def test_open_pdf(resources): pdf = Pdf.open(resources / 'graph.pdf') page = pdf.pages[0] Object._parse_stream(page, PrintParser())