(self)
| 134 | self.assertEqual(result.getvalue(), xml_str(self.data, 'utf-8')) |
| 135 | |
| 136 | def test_parse_text(self): |
| 137 | encodings = ('us-ascii', 'iso-8859-1', 'utf-8', |
| 138 | 'utf-16', 'utf-16le', 'utf-16be') |
| 139 | for encoding in encodings: |
| 140 | self.check_parse(StringIO(xml_str(self.data, encoding))) |
| 141 | make_xml_file(self.data, encoding) |
| 142 | with open(TESTFN, 'r', encoding=encoding) as f: |
| 143 | self.check_parse(f) |
| 144 | self.check_parse(StringIO(self.data)) |
| 145 | make_xml_file(self.data, encoding, None) |
| 146 | with open(TESTFN, 'r', encoding=encoding) as f: |
| 147 | self.check_parse(f) |
| 148 | |
| 149 | def test_parse_bytes(self): |
| 150 | # UTF-8 is default encoding, US-ASCII is compatible with UTF-8, |
nothing calls this directly
no test coverage detected