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

Method test_encode_contents

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

Source from the content-addressed store, hash-verified

1560 self.assertEqual("\N{SNOWMAN}", soup.b.decode_contents())
1561
1562 def test_encode_contents(self):
1563 html = "<b>\N{SNOWMAN}</b>"
1564 soup = self.soup(html)
1565 self.assertEqual(
1566 "\N{SNOWMAN}".encode("utf8"), soup.b.encode_contents(
1567 encoding="utf8"))
1568
1569 def test_deprecated_renderContents(self):
1570 html = "<b>\N{SNOWMAN}</b>"

Callers

nothing calls this directly

Calls 3

soupMethod · 0.45
encodeMethod · 0.45
encode_contentsMethod · 0.45

Tested by

no test coverage detected