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

Method setup

Lib/test/test_minidom.py:1504–1512  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1502
1503 def testReplaceWholeText(self):
1504 def setup():
1505 doc = parseString("<doc>a<e/>d</doc>")
1506 elem = doc.documentElement
1507 text1 = elem.firstChild
1508 text2 = elem.lastChild
1509 splitter = text1.nextSibling
1510 elem.insertBefore(doc.createTextNode("b"), splitter)
1511 elem.insertBefore(doc.createCDATASection("c"), text1)
1512 return doc, elem, text1, splitter, text2
1513
1514 doc, elem, text1, splitter, text2 = setup()
1515 text = text1.replaceWholeText("new content")

Callers

nothing calls this directly

Calls 4

parseStringFunction · 0.90
createTextNodeMethod · 0.80
createCDATASectionMethod · 0.80
insertBeforeMethod · 0.45

Tested by

no test coverage detected