(self)
| 533 | "<e a=\" 	\"></e></doc>")) |
| 534 | |
| 535 | def test_xmlgen_encoding(self): |
| 536 | encodings = ('iso-8859-15', 'utf-8', 'utf-8-sig', |
| 537 | 'utf-16', 'utf-16be', 'utf-16le', |
| 538 | 'utf-32', 'utf-32be', 'utf-32le') |
| 539 | for encoding in encodings: |
| 540 | result = self.ioclass() |
| 541 | gen = XMLGenerator(result, encoding=encoding) |
| 542 | |
| 543 | gen.startDocument() |
| 544 | gen.startElement("doc", {"a": '\u20ac'}) |
| 545 | gen.characters("\u20ac") |
| 546 | gen.endElement("doc") |
| 547 | gen.endDocument() |
| 548 | |
| 549 | self.assertEqual(result.getvalue(), |
| 550 | self.xml('<doc a="\u20ac">\u20ac</doc>', encoding=encoding)) |
| 551 | |
| 552 | def test_xmlgen_unencodable(self): |
| 553 | result = self.ioclass() |
nothing calls this directly
no test coverage detected