MCPcopy Index your code
hub / github.com/csev/py4e / test_replace_first_child

Method test_replace_first_child

code3/bs4/tests/test_tree.py:969–973  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

967 self.assertEqual(no.next_sibling, " business")
968
969 def test_replace_first_child(self):
970 data = "<a><b></b><c></c></a>"
971 soup = self.soup(data)
972 soup.b.replace_with(soup.c)
973 self.assertEqual("<a><c></c></a>", soup.decode())
974
975 def test_replace_last_child(self):
976 data = "<a><b></b><c></c></a>"

Callers

nothing calls this directly

Calls 3

soupMethod · 0.45
replace_withMethod · 0.45
decodeMethod · 0.45

Tested by

no test coverage detected