#NEWLINE# def test_overkill( self ) : #NEWLINE# #INDENT# children = [ ] #NEWLINE# def child_created( child ) : #NEWLINE# #INDENT# if ( not children ) : #NEWLINE# #INDENT# child . stdout_write ( b'AA\n' ) #NEWLINE# #UNINDENT# children . append ( child ) #NEWLINE# #UNINDENT# pool = worker_pool ( child_created , 10 , enumerate ( ( b'job1\n' , ) ) , popen = _MockPopen ) #NEWLINE# response = next ( pool ) #NEWLINE# self . assertEqual ( len ( children ) , 1 ) #NEWLINE# c = children [ 0 ] #NEWLINE# self . assertEqual ( c . stdin_readline ( ) , b'job1\n' ) #NEWLINE# self . assertEqual ( response , ( [ None ] , 0 , b'AA\n' ) ) #NEWLINE# self . assertRaises ( StopIteration , next , pool ) #NEWLINE# for c in children : #NEWLINE# #INDENT# c . close_pipes ( )