MCPcopy Index your code
hub / github.com/python/cpython / testStandalone

Method testStandalone

Lib/test/test_minidom.py:1273–1287  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1271 doc.unlink()
1272
1273 def testStandalone(self):
1274 doc = parseString('<foo>&#x20ac;</foo>')
1275 self.assertEqual(doc.toxml(),
1276 '<?xml version="1.0" ?><foo>\u20ac</foo>')
1277 self.assertEqual(doc.toxml(standalone=None),
1278 '<?xml version="1.0" ?><foo>\u20ac</foo>')
1279 self.assertEqual(doc.toxml(standalone=True),
1280 '<?xml version="1.0" standalone="yes"?><foo>\u20ac</foo>')
1281 self.assertEqual(doc.toxml(standalone=False),
1282 '<?xml version="1.0" standalone="no"?><foo>\u20ac</foo>')
1283 self.assertEqual(doc.toxml('utf-8', True),
1284 b'<?xml version="1.0" encoding="utf-8" standalone="yes"?>'
1285 b'<foo>\xe2\x82\xac</foo>')
1286
1287 doc.unlink()
1288
1289 class UserDataHandler:
1290 called = 0

Callers

nothing calls this directly

Calls 4

parseStringFunction · 0.90
toxmlMethod · 0.80
assertEqualMethod · 0.45
unlinkMethod · 0.45

Tested by

no test coverage detected