def test_document_starts_with_bogus_declaration(self):
soup = self.soup('<! Foo >a')
# 'Foo' becomes a comment that appears before the HTML.
comment = soup.contents[0]
self.assertTrue(isinstance(comment, Comment))
self.assertEqual(comment, 'Foo')
self.assertEqual(self.find(text="a") == "a")
评论列表
文章目录