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

Method testModifyAttributes

pattern/web/soup/BeautifulSoupTests.py:308–315  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

306 "Testing the modification of the tree."
307
308 def testModifyAttributes(self):
309 soup = BeautifulSoup('<a id="1"></a>')
310 soup.a['id'] = 2
311 self.assertEqual(soup.renderContents(), '<a id="2"></a>')
312 del(soup.a['id'])
313 self.assertEqual(soup.renderContents(), '<a></a>')
314 soup.a['id2'] = 'foo'
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."

Callers

nothing calls this directly

Calls 2

BeautifulSoupClass · 0.90
renderContentsMethod · 0.80

Tested by

no test coverage detected