MCPcopy Index your code
hub / github.com/python/cpython / test_extend_mutable_list2

Method test_extend_mutable_list2

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

Source from the content-addressed store, hash-verified

2826 e.extend(L)
2827
2828 def test_extend_mutable_list2(self):
2829 class X:
2830 @property
2831 def __class__(self):
2832 del L[:]
2833 return ET.Element
2834 L = [X(), ET.Element('baz')]
2835 e = ET.Element('foo')
2836 try:
2837 e.extend(L)
2838 except TypeError:
2839 pass
2840
2841 class Y(X, ET.Element):
2842 pass
2843 L = [Y('bar'), ET.Element('baz')]
2844 e = ET.Element('foo')
2845 e.extend(L)
2846
2847 def test_remove_with_clear_assume_missing(self):
2848 # gh-126033: Check that a concurrent clear() for an assumed-to-be

Callers

nothing calls this directly

Calls 3

extendMethod · 0.95
XClass · 0.70
YClass · 0.70

Tested by

no test coverage detected