MCPcopy Index your code
hub / github.com/clips/pattern / testReplaceWithChildren

Method testReplaceWithChildren

pattern/web/soup/BeautifulSoupTests.py:409–415  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

407 self.assertEqual(weText.nextSibling, f)
408
409 def testReplaceWithChildren(self):
410 soup = BeautifulStoneSoup(
411 "<top><replace><child1/><child2/></replace></top>",
412 selfClosingTags=["child1", "child2"])
413 soup.replaceTag.replaceWithChildren()
414 self.assertEqual(soup.top.contents[0].name, "child1")
415 self.assertEqual(soup.top.contents[1].name, "child2")
416
417 def testAppend(self):
418 doc = "<p>Don't leave me <b>here</b>.</p> <p>Don't leave me.</p>"

Callers

nothing calls this directly

Calls 2

BeautifulStoneSoupClass · 0.85
replaceWithChildrenMethod · 0.80

Tested by

no test coverage detected