(self)
| 180 | "Tests the nextSibling and previousSibling navigation." |
| 181 | |
| 182 | def testSiblings(self): |
| 183 | soup = BeautifulSoup("<ul><li>1<p>A</p>B<li>2<li>3</ul>") |
| 184 | secondLI = soup.find('li').nextSibling |
| 185 | self.assert_(secondLI.name == 'li' and secondLI.string == '2') |
| 186 | self.assertEquals(soup.find(text='1').nextSibling.name, 'p') |
| 187 | self.assertEquals(soup.find('p').nextSibling, 'B') |
| 188 | self.assertEquals(soup.find('p').nextSibling.previousSibling.nextSibling, 'B') |
| 189 | |
| 190 | class TagsAreObjectsToo(SoupTest): |
| 191 | "Tests the various built-in functions of Tag objects." |
nothing calls this directly
no test coverage detected