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

Method test_methods

Lib/test/test_xml_etree.py:1058–1071  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1056 self.assertRaises(LookupError, ET.XML, xml('xxx').encode('ascii'))
1057
1058 def test_methods(self):
1059 # Test serialization methods.
1060
1061 e = ET.XML("<html><link/><script>1 &lt; 2</script></html>")
1062 e.tail = "\n"
1063 self.assertEqual(serialize(e),
1064 '<html><link /><script>1 &lt; 2</script></html>\n')
1065 self.assertEqual(serialize(e, method=None),
1066 '<html><link /><script>1 &lt; 2</script></html>\n')
1067 self.assertEqual(serialize(e, method="xml"),
1068 '<html><link /><script>1 &lt; 2</script></html>\n')
1069 self.assertEqual(serialize(e, method="html"),
1070 '<html><link><script>1 < 2</script></html>\n')
1071 self.assertEqual(serialize(e, method="text"), '1 < 2\n')
1072
1073 def test_issue18347(self):
1074 e = ET.XML('<html><CamelCase>text</CamelCase></html>')

Callers

nothing calls this directly

Calls 2

serializeFunction · 0.85
assertEqualMethod · 0.45

Tested by

no test coverage detected