MCPcopy
hub / github.com/csev/py4e / test_replace_last_child

Method test_replace_last_child

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

Source from the content-addressed store, hash-verified

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>"
977 soup = self.soup(data)
978 soup.c.replace_with(soup.b)
979 self.assertEqual("<a><b></b></a>", soup.decode())
980
981 def test_nested_tag_replace_with(self):
982 soup = self.soup(

Callers

nothing calls this directly

Calls 3

soupMethod · 0.45
replace_withMethod · 0.45
decodeMethod · 0.45

Tested by

no test coverage detected