class HTMLTreeBuilderSmokeTest(TreeBuilderSmokeTest): (source)
Known subclasses: bs4.tests.HTML5TreeBuilderSmokeTest
, bs4.tests.test_htmlparser.TestHTMLParserTreeBuilder
, bs4.tests.test_lxml.TestLXMLTreeBuilder
A basic test of a treebuilder's competence. Any HTML treebuilder, present or future, should be able to pass these tests. With invalid markup, there's room for interpretation, and different parsers can handle it differently. But with the markup in these tests, there's not much room for interpretation.
Method | assert |
Assert that a given doctype string is handled correctly. |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Parsers don't need to *understand* namespaces, but at the very least they should not choke on namespaces or lose data. |
Method | test |
A <br> tag is designated as an empty-element tag. |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
One table can go inside another one. |
Method | test |
Make sure you can copy the tree builder. |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Verify consistent handling of empty-element tags, no matter how they come in through the markup. |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Prevent recurrence of a bug in the html5lib treebuilder. |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Mostly to prevent a recurrence of a bug in the html5lib treebuilder. |
Method | test |
Prevent recurrence of a bug in the html5lib treebuilder. |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Block elements can be nested. |
Method | test |
Undocumented |
Method | test |
Inline elements can be nested indefinitely. |
Method | test |
Undocumented |
Method | test |
Make sure normal, everyday HTML doctypes are handled correctly. |
Method | test |
Undocumented |
Method | test |
A <p> tag is never designated as an empty-element tag. |
Method | test |
Undocumented |
Method | test |
Whitespace must be preserved in <pre> and <textarea> tags, even if that would mean not prettifying the markup. |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
A real XHTML document should come out more or less the same as it went in. |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Parsers should be able to work with SoupStrainers. |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
A tag that's not closed by the end of the document should be closed. |
Method | test |
Test the worst case (currently) for linking issues. |
Method | _document |
Generate and parse a document with the given doctype. |
Inherited from TreeBuilderSmokeTest
:
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Parsers don't need to *understand* namespaces, but at the very least they should not choke on namespaces or lose data.
A <br> tag is designated as an empty-element tag. Some parsers treat <br></br> as one <br/> tag, some parsers as two tags, but it should always be an empty-element tag.
Make sure you can copy the tree builder. This is important because the builder is part of a BeautifulSoup object, and we want to be able to copy that.
A <p> tag is never designated as an empty-element tag. Even if the markup shows it as an empty-element tag, it shouldn't be presented that way.
Whitespace must be preserved in <pre> and <textarea> tags, even if that would mean not prettifying the markup.
bs4.tests.HTML5TreeBuilderSmokeTest
A real XHTML document should come out more or less the same as it went in.
bs4.tests.test_html5lib.TestHTML5LibBuilder
Parsers should be able to work with SoupStrainers.