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

Method test_element_get_tail

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

Source from the content-addressed store, hash-verified

2990 self.assertEqual(elem.text, 'ABCDEFGHIJKL')
2991
2992 def test_element_get_tail(self):
2993 # Issue #27863
2994 class X(str):
2995 def __del__(self):
2996 try:
2997 elem[0].tail
2998 except NameError:
2999 pass
3000
3001 b = ET.TreeBuilder()
3002 b.start('root', {})
3003 b.start('tag', {})
3004 b.end('tag')
3005 b.data('ABCD')
3006 b.data(X('EFGH'))
3007 b.data('IJKL')
3008 b.end('root')
3009
3010 elem = b.close()
3011 self.assertEqual(elem[0].tail, 'ABCDEFGHIJKL')
3012
3013 def test_subscr_with_clear(self):
3014 # See https://github.com/python/cpython/issues/143200.

Callers

nothing calls this directly

Calls 6

startMethod · 0.95
endMethod · 0.95
dataMethod · 0.95
closeMethod · 0.95
XClass · 0.70
assertEqualMethod · 0.45

Tested by

no test coverage detected