gen.endElement("e")
gen.startElement("e", {"a": "'\""})
gen.endElement("e")
+ gen.startElement("e", {"a": "\n\r\t"})
+ gen.endElement("e")
gen.endElement("doc")
gen.endDocument()
- return result.getvalue() == start \
- + "<doc a='\"'><e a=\"'\"></e><e a=\"'"\"></e></doc>"
+ return result.getvalue() == start + ("<doc a='\"'><e a=\"'\"></e>"
+ "<e a=\"'"\"></e>"
+ "<e a=\" 	\"></e></doc>")
def test_xmlgen_ignorable():
result = StringIO()
the optional entities parameter. The keys and values must all be
strings; each key will be replaced with its corresponding value.
"""
+ entities = entities.copy()
+ entities.update({'\n': ' ', '\r': ' ', '\t':'	'})
data = escape(data, entities)
if '"' in data:
if "'" in data: