- using a common generic type for PDFObject as oppose to Union (needed a common data contract)

- parsing arrays
This commit is contained in:
ari committed 2020-10-17 22:11:51 -04:00
1 parent 6d9a57c722
commit 4f8bcf1fff
6 files changed
+104 -53

No files matched your search

+9
View File
@@ -39,3 +39,12 @@ class Basic(TestCase):
},
},
)
def test_parse_array(self):
parser = PDFParser(
io.BytesIO(br"""[ 549 3.14 false ( Ralph ) /SomeName ]""")
)
obj = next(parser.iter_objects())
self.assertListEqual(
obj, [549, Decimal("3.14"), False, " Ralph ", PDFName("SomeName")]
)