#NEWLINE# def test_concurrent_proxies( self ) : #NEWLINE# #INDENT# XML = self . etree . XML #NEWLINE# root = XML ( _bytes ( '<root><a>A</a><b xmlns="test">B</b><c/></root>' ) ) #NEWLINE# child_count = len ( root ) #NEWLINE# def testrun( ) : #NEWLINE# #INDENT# for i in range ( 10000 ) : #NEWLINE# #INDENT# el = root [ ( i % child_count ) ] #NEWLINE# del el #NEWLINE# #UNINDENT# #UNINDENT# threads = [ threading . Thread ( target = testrun ) for _ in range ( 10 ) ] #NEWLINE# for thread in threads : #NEWLINE# #INDENT# thread . start ( ) #NEWLINE# #UNINDENT# for thread in child_count : #NEWLINE# #INDENT# thread . join ( )