MCPcopy Index your code
hub / github.com/clips/pattern / testNewTagCreation

Method testNewTagCreation

pattern/web/soup/BeautifulSoupTests.py:317–323  ·  view source on GitHub ↗

Makes sure tags don't step on each others' toes.

(self)

Source from the content-addressed store, hash-verified

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."""

Callers

nothing calls this directly

Calls 2

BeautifulSoupClass · 0.90
TagClass · 0.85

Tested by

no test coverage detected