def test_findtext_with_mutating(self): e = ET.Element('foo') e.extend([ET.Element('bar')]) e.findtext(MutatingElementPath(e, 'x'))