diff options
author | Leonard Richardson <leonard.richardson@canonical.com> | 2012-02-15 11:03:44 -0500 |
---|---|---|
committer | Leonard Richardson <leonard.richardson@canonical.com> | 2012-02-15 11:03:44 -0500 |
commit | d8edc821b2bef6dd302ee88782f8c458e06eaf37 (patch) | |
tree | 690e76eb2552ef042127b9918a2374516b9413e9 /bs4/tests | |
parent | 2925f54230552441dda94c8c9e8ef8f8c7ad0f60 (diff) |
Tested and cleaned up html5lib insertBefore.
Diffstat (limited to 'bs4/tests')
-rw-r--r-- | bs4/tests/test_html5lib.py | 5 | ||||
-rw-r--r-- | bs4/tests/test_lxml.py | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/bs4/tests/test_html5lib.py b/bs4/tests/test_html5lib.py index d257392..dcbd204 100644 --- a/bs4/tests/test_html5lib.py +++ b/bs4/tests/test_html5lib.py @@ -131,6 +131,11 @@ class TestHTML5BuilderInvalidMarkup(TestLXMLBuilderInvalidMarkup): ('<table><tbody><tr></tr></tbody></table>' '<table><tbody><tr id="nested"></tr></tbody></table>')) + def test_floating_text_in_table(self): + self.assertSoupEquals( + "<table><td></td>foo<td>bar</td></table>", + "foo<table><tbody><tr><td></td><td>bar</td></tr></tbody></table>") + def test_empty_element_tag_with_contents(self): self.assertSoupEquals("<br>foo</br>", "<br />foo<br />") diff --git a/bs4/tests/test_lxml.py b/bs4/tests/test_lxml.py index e2cb2d2..359f619 100644 --- a/bs4/tests/test_lxml.py +++ b/bs4/tests/test_lxml.py @@ -381,6 +381,9 @@ class TestLXMLBuilderInvalidMarkup(SoupTest): '<table><tr><table><tr id="nested">', '<table><tr><table><tr id="nested"></tr></table></tr></table>') + def test_floating_text_in_table(self): + self.assertSoupEquals("<table><td></td>foo<td>bar</td></table>") + def test_paragraphs_containing_block_display_elements(self): markup = self.soup("<p>this is the definition:" "<dl><dt>first case</dt>") |