got rid of the parse context in favour of a contextual trait
This commit is contained in:
1 parent
3fec7a1747
commit
c7d618284b
6 files changed
+208
-164
No files matched your search
@@ -1,13 +1,13 @@
|
||||
from decimal import Decimal
|
||||
import io
|
||||
from pdfmajor.parser_v2.objects import PDFName
|
||||
from pdfmajor.parser_v2 import PDFParser
|
||||
from pdfmajor.parser_v2.l1 import PDFL1Parser
|
||||
from unittest import TestCase
|
||||
|
||||
|
||||
class Basic(TestCase):
|
||||
class L1(TestCase):
|
||||
def test_parse_dict(self):
|
||||
parser = PDFParser(
|
||||
parser = PDFL1Parser(
|
||||
io.BytesIO(
|
||||
br"""<< /Type /Example
|
||||
/Subtype /DictionaryExample
|
||||
@@ -41,7 +41,7 @@ class Basic(TestCase):
|
||||
)
|
||||
|
||||
def test_parse_array(self):
|
||||
parser = PDFParser(
|
||||
parser = PDFL1Parser(
|
||||
io.BytesIO(br"""[ 549 3.14 false ( Ralph ) /SomeName ]""")
|
||||
)
|
||||
obj = next(parser.iter_objects())
|
||||
@@ -50,7 +50,7 @@ class Basic(TestCase):
|
||||
)
|
||||
|
||||
def test_parse_nested_array(self):
|
||||
parser = PDFParser(
|
||||
parser = PDFL1Parser(
|
||||
io.BytesIO(
|
||||
br"""[ [10 30] [22 33] [
|
||||
<< /x 0 /y 5 >>
|
||||
|
||||
Reference in new issue
Block a user