MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_lost_elem

Method test_lost_elem

Lib/test/test_xml_etree.py:2487–2505  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 7

appendMethod · 0.95
iterMethod · 0.95
TagClass · 0.85
nextFunction · 0.85
skipTestMethod · 0.80
assertIsInstanceMethod · 0.80
assertEqualMethod · 0.45

Tested by

no test coverage detected