Makes sure tags don't step on each others' toes.
(self)
| 315 | self.assertEqual(soup.renderContents(), '<a id2="foo"></a>') |
| 316 | |
| 317 | def testNewTagCreation(self): |
| 318 | "Makes sure tags don't step on each others' toes." |
| 319 | soup = BeautifulSoup() |
| 320 | a = Tag(soup, 'a') |
| 321 | ol = Tag(soup, 'ol') |
| 322 | a['href'] = 'http://foo.com/' |
| 323 | self.assertRaises(KeyError, lambda : ol['href']) |
| 324 | |
| 325 | def testNewTagWithAttributes(self): |
| 326 | """Makes sure new tags can be created complete with attributes.""" |
nothing calls this directly
no test coverage detected