bs4.tests.test_html5lib#

Tests to ensure that the html5lib tree builder generates good trees.

Module Contents#

Classes#

TestHTML5LibBuilder

See HTML5TreeBuilderSmokeTest.

class bs4.tests.test_html5lib.TestHTML5LibBuilder#

Bases: bs4.tests.SoupTest, bs4.tests.HTML5TreeBuilderSmokeTest

See HTML5TreeBuilderSmokeTest.

property default_builder#
test_soupstrainer()#

Parsers should be able to work with SoupStrainers.

test_correctly_nested_tables()#

html5lib inserts <tbody> tags where other parsers don’t.

test_xml_declaration_followed_by_doctype()#
test_reparented_markup()#
test_reparented_markup_ends_with_whitespace()#
test_reparented_markup_containing_identical_whitespace_nodes()#

Verify that we keep the two whitespace nodes in this document distinct when reparenting the adjacent <tbody> tags.

test_reparented_markup_containing_children()#
test_processing_instruction()#

Processing instructions become comments.

test_cloned_multivalue_node()#
test_foster_parenting()#
test_extraction()#

Test that extraction does not destroy the tree.

https://bugs.launchpad.net/beautifulsoup/+bug/1782928

test_empty_comment()#

Test that empty comment does not break structure.

https://bugs.launchpad.net/beautifulsoup/+bug/1806598

test_tracking_line_numbers()#
test_special_string_containers()#
test_html5_attributes()#