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

Method test_nested_inline_elements

code3/bs4/testing.py:222–231  ·  view source on GitHub ↗

Inline elements can be nested indefinitely.

(self)

Source from the content-addressed store, hash-verified

220 self.assertSoupEquals("<textarea> woo </textarea>")
221
222 def test_nested_inline_elements(self):
223 """Inline elements can be nested indefinitely."""
224 b_tag = "<b>Inside a B tag</b>"
225 self.assertSoupEquals(b_tag)
226
227 nested_b_tag = "<p>A <i>nested <b>tag</b></i></p>"
228 self.assertSoupEquals(nested_b_tag)
229
230 double_nested_b_tag = "<p>A <a>doubly <i>nested <b>tag</b></i></a></p>"
231 self.assertSoupEquals(nested_b_tag)
232
233 def test_nested_block_level_elements(self):
234 """Block elements can be nested."""

Callers

nothing calls this directly

Calls 1

assertSoupEqualsMethod · 0.45

Tested by

no test coverage detected