(self)
| 200 | self.assertEqual("text/javascript", soup.find('script')['type']) |
| 201 | |
| 202 | def test_comment(self): |
| 203 | # Comments are represented as Comment objects. |
| 204 | markup = "<p>foo<!--foobar-->baz</p>" |
| 205 | self.assertSoupEquals(markup) |
| 206 | |
| 207 | soup = self.soup(markup) |
| 208 | comment = soup.find(text="foobar") |
| 209 | self.assertEqual(comment.__class__, Comment) |
| 210 | |
| 211 | # The comment is properly integrated into the tree. |
| 212 | foo = soup.find(text="foo") |
| 213 | self.assertEqual(comment, foo.next_element) |
| 214 | baz = soup.find(text="baz") |
| 215 | self.assertEqual(comment, baz.previous_element) |
| 216 | |
| 217 | def test_preserved_whitespace_in_pre_and_textarea(self): |
| 218 | """Whitespace must be preserved in <pre> and <textarea> tags.""" |
nothing calls this directly
no test coverage detected