mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
The "context" parameter to the ExternalEntityRefParameter exposes internal
information from the Expat library that is not part of its public API. Do not print this information as the format of the string may (and will) change as Expat evolves. Add additional tests to make sure the ParserCreate() function raises the right exceptions on illegal parameters.
This commit is contained in:
parent
9a1a7dda8f
commit
1e0611b208
2 changed files with 44 additions and 4 deletions
|
@ -30,7 +30,7 @@ Character data:
|
|||
End of CDATA section
|
||||
End element:
|
||||
'sub2'
|
||||
External entity ref: ('http://www.python.org/namespace=http://www.w3.org/XML/1998/namespace\014external_entity', None, 'entity.file', None)
|
||||
External entity ref: (None, 'entity.file', None)
|
||||
End element:
|
||||
'root'
|
||||
PI:
|
||||
|
@ -60,7 +60,7 @@ Character data:
|
|||
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)
|
||||
External entity ref: (None, u'entity.file', None)
|
||||
End element:
|
||||
u'root'
|
||||
PI:
|
||||
|
@ -90,6 +90,15 @@ Character data:
|
|||
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)
|
||||
External entity ref: (None, u'entity.file', None)
|
||||
End element:
|
||||
u'root'
|
||||
|
||||
Testing constructor for proper handling of namespace_separator values:
|
||||
Legal values tested o.k.
|
||||
Caught expected TypeError:
|
||||
ParserCreate, argument 2: expected string or None, int found
|
||||
Caught expected ValueError:
|
||||
namespace_separator must be one character, omitted, or None
|
||||
Caught expected ValueError:
|
||||
namespace_separator must be one character, omitted, or None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue