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