MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_methods

Method test_methods

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

Source from the content-addressed store, hash-verified

1029 self.assertRaises(LookupError, ET.XML, xml('xxx').encode('ascii'))
1030
1031 def test_methods(self):
1032 # Test serialization methods.
1033
1034 e = ET.XML("<html><link/><script>1 &lt; 2</script></html>")
1035 e.tail = "\n"
1036 self.assertEqual(serialize(e),
1037 '<html><link /><script>1 &lt; 2</script></html>\n')
1038 self.assertEqual(serialize(e, method=None),
1039 '<html><link /><script>1 &lt; 2</script></html>\n')
1040 self.assertEqual(serialize(e, method="xml"),
1041 '<html><link /><script>1 &lt; 2</script></html>\n')
1042 self.assertEqual(serialize(e, method="html"),
1043 '<html><link><script>1 < 2</script></html>\n')
1044 self.assertEqual(serialize(e, method="text"), '1 < 2\n')
1045
1046 def test_issue18347(self):
1047 e = ET.XML('<html><CamelCase>text</CamelCase></html>')

Callers

nothing calls this directly

Calls 2

serializeFunction · 0.70
assertEqualMethod · 0.45

Tested by

no test coverage detected