Change pyexpat test suite to exercise the .returns_unicode attribute,

parsing the sample data once with 8-bit strings and once with Unicode.
This commit is contained in:
Andrew M. Kuchling 2000-06-27 00:37:25 +00:00
parent beba056cd7
commit 7fd7e36b08
2 changed files with 121 additions and 20 deletions

View file

@ -1,31 +1,91 @@
test_pyexpat
PI:
xml-stylesheet href="stylesheet.css"
'xml-stylesheet' 'href="stylesheet.css"'
Comment:
' comment data '
Notation declared: ('notation', None, 'notation.jpeg', None)
Unparsed entity decl:
('unparsed_entity', None, 'entity.file', None, 'notation')
Start element:
root {}
'root' {'attr1': 'value1', 'attr2': 'value2\341\275\200'}
NS decl:
myns http://www.python.org/namespace
'myns' 'http://www.python.org/namespace'
Start element:
http://www.python.org/namespace!subelement {}
'http://www.python.org/namespace!subelement' {}
Character data:
'Contents of subelements'
End element:
http://www.python.org/namespace!subelement
'http://www.python.org/namespace!subelement'
End of NS decl:
myns
'myns'
Start element:
sub2 {}
'sub2' {}
Start of CDATA section
Character data:
'contents of CDATA section'
End of CDATA section
End element:
sub2
External entity ref: http://www.python.org/namespace=http://www.w3.org/XML/1998/namespace external_entity None entity.file None
'sub2'
External entity ref: ('http://www.python.org/namespace=http://www.w3.org/XML/1998/namespace\014external_entity', None, 'entity.file', None)
End element:
root
'root'
PI:
u'xml-stylesheet' u'href="stylesheet.css"'
Comment:
u' comment data '
Notation declared: (u'notation', None, u'notation.jpeg', None)
Unparsed entity decl:
(u'unparsed_entity', None, u'entity.file', None, u'notation')
Start element:
u'root' {u'attr1': u'value1', u'attr2': u'value2\u1F40'}
NS decl:
u'myns' u'http://www.python.org/namespace'
Start element:
u'http://www.python.org/namespace!subelement' {}
Character data:
u'Contents of subelements'
End element:
u'http://www.python.org/namespace!subelement'
End of NS decl:
u'myns'
Start element:
u'sub2' {}
Start of CDATA section
Character data:
u'contents of CDATA section'
End of CDATA section
End element:
u'sub2'
External entity ref: (u'http://www.python.org/namespace=http://www.w3.org/XML/1998/namespace\014external_entity', None, u'entity.file', None)
End element:
u'root'
PI:
u'xml-stylesheet' u'href="stylesheet.css"'
Comment:
u' comment data '
Notation declared: (u'notation', None, u'notation.jpeg', None)
Unparsed entity decl:
(u'unparsed_entity', None, u'entity.file', None, u'notation')
Start element:
u'root' {u'attr1': u'value1', u'attr2': u'value2\u1F40'}
NS decl:
u'myns' u'http://www.python.org/namespace'
Start element:
u'http://www.python.org/namespace!subelement' {}
Character data:
u'Contents of subelements'
End element:
u'http://www.python.org/namespace!subelement'
End of NS decl:
u'myns'
Start element:
u'sub2' {}
Start of CDATA section
Character data:
u'contents of CDATA section'
End of CDATA section
End element:
u'sub2'
External entity ref: (u'http://www.python.org/namespace=http://www.w3.org/XML/1998/namespace\014external_entity', None, u'entity.file', None)
End element:
u'root'