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

Method test_treebuilder_comment

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

Source from the content-addressed store, hash-verified

3738 self.assertIsNone(parser.close())
3739
3740 def test_treebuilder_comment(self):
3741 b = ET.TreeBuilder()
3742 self.assertEqual(b.comment('ctext').tag, ET.Comment)
3743 self.assertEqual(b.comment('ctext').text, 'ctext')
3744
3745 b = ET.TreeBuilder(comment_factory=ET.Comment)
3746 self.assertEqual(b.comment('ctext').tag, ET.Comment)
3747 self.assertEqual(b.comment('ctext').text, 'ctext')
3748
3749 b = ET.TreeBuilder(comment_factory=len)
3750 self.assertEqual(b.comment('ctext'), len('ctext'))
3751
3752 def test_treebuilder_pi(self):
3753 b = ET.TreeBuilder()

Callers

nothing calls this directly

Calls 2

commentMethod · 0.95
assertEqualMethod · 0.45

Tested by

no test coverage detected