MCPcopy Create free account
hub / github.com/clips/pattern / testNext

Method testNext

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

Source from the content-addressed store, hash-verified

129 PROXIMITY_TEST = BeautifulSoup('<b id="1"><b id="2"><b id="3"><b id="4">')
130
131 def testNext(self):
132 soup = self.PROXIMITY_TEST
133 b = soup.find('b', {'id' : 2})
134 self.assertEquals(b.findNext('b')['id'], '3')
135 self.assertEquals(b.findNext('b')['id'], '3')
136 self.assertEquals(len(b.findAllNext('b')), 2)
137 self.assertEquals(len(b.findAllNext('b', {'id' : 4})), 1)
138
139 def testPrevious(self):
140 soup = self.PROXIMITY_TEST

Callers

nothing calls this directly

Calls 4

lenFunction · 0.85
findNextMethod · 0.80
findAllNextMethod · 0.80
findMethod · 0.45

Tested by

no test coverage detected