(self)
| 2491 | ET.register_namespace('test10777', 'http://myuri/') |
| 2492 | |
| 2493 | def test_lost_text(self): |
| 2494 | # Issue #25902: Borrowed text can disappear |
| 2495 | class Text: |
| 2496 | def __bool__(self): |
| 2497 | e.text = 'changed' |
| 2498 | return True |
| 2499 | |
| 2500 | e = ET.Element('tag') |
| 2501 | e.text = Text() |
| 2502 | i = e.itertext() |
| 2503 | t = next(i) |
| 2504 | self.assertIsInstance(t, Text) |
| 2505 | self.assertIsInstance(e.text, str) |
| 2506 | self.assertEqual(e.text, 'changed') |
| 2507 | |
| 2508 | def test_lost_tail(self): |
| 2509 | # Issue #25902: Borrowed tail can disappear |
nothing calls this directly
no test coverage detected