diff options
author | Leonard Richardson <leonard.richardson@canonical.com> | 2011-02-18 14:24:42 -0500 |
---|---|---|
committer | Leonard Richardson <leonard.richardson@canonical.com> | 2011-02-18 14:24:42 -0500 |
commit | 0c9e690dedf720c7c34cc2433f0ccd03f7eb2a85 (patch) | |
tree | 399e4aba45e8488914731b609ee8890680aa4535 /TODO | |
parent | b5fa9d7f5579f22f5fe0f7c9dc63e0aa7d29262f (diff) |
Ported tests of bad markup that were lying around the TODO.
Diffstat (limited to 'TODO')
-rw-r--r-- | TODO | 29 |
1 files changed, 0 insertions, 29 deletions
@@ -26,35 +26,6 @@ objects instead of Comment objects in this situation. --- -Here are some unit tests that fail with HTMLParser. - - def testValidButBogusDeclarationFAILS(self): - self.assertSoupEquals('<! Foo >a', '<!Foo >a') - - def testIncompleteDeclarationAtEndFAILS(self): - self.assertSoupEquals('a<!b') - - def testIncompleteEntityAtEndFAILS(self): - self.assertSoupEquals('<Hello>') - - # This is not what the original author had in mind, but it's - # a legitimate interpretation of what they wrote. - self.assertSoupEquals("""<a href="foo</a>, </a><a href="bar">baz</a>""", - '<a href="foo</a>, </a><a href="></a>, <a href="bar">baz</a>') - # SGMLParser generates bogus parse events when attribute values - # contain embedded brackets, but at least Beautiful Soup fixes - # it up a little. - self.assertSoupEquals('<a b="<a>">', '<a b="<a>"></a><a>"></a>') - self.assertSoupEquals('<a href="http://foo.com/<a> and blah and blah', - """<a href='"http://foo.com/'></a><a> and blah and blah</a>""") - - invalidEntity = "foo&#bar;baz" - soup = BeautifulStoneSoup\ - (invalidEntity, - convertEntities=htmlEnt) - self.assertEquals(str(soup), invalidEntity) - - Tag names that contain Unicode characters crash the parser: def testUnicodeTagNamesFAILS(self): self.assertSoupEquals("<デダ芻デダtext>2PM</デダ芻デダtext>") |