(self)
| 207 | |
| 208 | @unittest.expectedFailure # TODO: RUSTPYTHON; AttributeError: 'xmlparser' object has no attribute 'SetParamEntityParsing' |
| 209 | def test_parse_close_source(self): |
| 210 | builtin_open = open |
| 211 | fileobj = None |
| 212 | |
| 213 | def mock_open(*args): |
| 214 | nonlocal fileobj |
| 215 | fileobj = builtin_open(*args) |
| 216 | return fileobj |
| 217 | |
| 218 | with mock.patch('xml.sax.saxutils.open', side_effect=mock_open): |
| 219 | make_xml_file(self.data, 'iso-8859-1', None) |
| 220 | with self.assertRaises(SAXException): |
| 221 | self.check_parse(TESTFN) |
| 222 | self.assertTrue(fileobj.closed) |
| 223 | |
| 224 | @unittest.expectedFailure # TODO: RUSTPYTHON; AttributeError: 'xmlparser' object has no attribute 'SetParamEntityParsing' |
| 225 | def check_parseString(self, s): |
nothing calls this directly
no test coverage detected