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

Method test_nested_block_level_elements

code3/bs4/testing.py:233–238  ·  view source on GitHub ↗

Block elements can be nested.

(self)

Source from the content-addressed store, hash-verified

231 self.assertSoupEquals(nested_b_tag)
232
233 def test_nested_block_level_elements(self):
234 """Block elements can be nested."""
235 soup = self.soup('<blockquote><p><b>Foo</b></p></blockquote>')
236 blockquote = soup.blockquote
237 self.assertEqual(blockquote.p.b.string, 'Foo')
238 self.assertEqual(blockquote.b.string, 'Foo')
239
240 def test_correctly_nested_tables(self):
241 """One table can go inside another one."""

Callers

nothing calls this directly

Calls 1

soupMethod · 0.45

Tested by

no test coverage detected