(self)
| 2485 | |
| 2486 | @unittest.expectedFailure # TODO: RUSTPYTHON |
| 2487 | def test_lost_elem(self): |
| 2488 | # Issue #25902: Borrowed element can disappear |
| 2489 | class Tag: |
| 2490 | def __eq__(self, other): |
| 2491 | e[0] = ET.Element('changed') |
| 2492 | next(i) |
| 2493 | return True |
| 2494 | |
| 2495 | e = ET.Element('root') |
| 2496 | e.append(ET.Element(Tag())) |
| 2497 | e.append(ET.Element('tag')) |
| 2498 | i = e.iter('tag') |
| 2499 | try: |
| 2500 | t = next(i) |
| 2501 | except ValueError: |
| 2502 | self.skipTest('generators are not reentrant') |
| 2503 | self.assertIsInstance(t.tag, Tag) |
| 2504 | self.assertIsInstance(e[0].tag, str) |
| 2505 | self.assertEqual(e[0].tag, 'changed') |
| 2506 | |
| 2507 | def check_expat224_utf8_bug(self, text): |
| 2508 | xml = b'<a b="%s"/>' % text |
nothing calls this directly
no test coverage detected