(self)
| 824 | self.assertEqual("three", soup.b.string) |
| 825 | |
| 826 | def test_replace_final_node(self): |
| 827 | soup = self.soup("<b>Argh!</b>") |
| 828 | soup.find(text="Argh!").replace_with("Hooray!") |
| 829 | new_text = soup.find(text="Hooray!") |
| 830 | b = soup.b |
| 831 | self.assertEqual(new_text.previous_element, b) |
| 832 | self.assertEqual(new_text.parent, b) |
| 833 | self.assertEqual(new_text.previous_element.next_element, new_text) |
| 834 | self.assertEqual(new_text.next_element, None) |
| 835 | |
| 836 | def test_consecutive_text_nodes(self): |
| 837 | # A builder should never create two consecutive text nodes, |
nothing calls this directly
no test coverage detected