#NEWLINE# def test_brokenStopProducing( self ) : #NEWLINE# #INDENT# "\n        If the body producer's C{stopProducing} method raises an exception,\n        L{Request.stopWriting} logs it and does not re-raise it.\n        " #NEWLINE# producer = StringProducer ( 3 ) #NEWLINE# def brokenStopProducing( ) : #NEWLINE# #INDENT# raise ArbitraryException ( 'stopProducing is busted' ) #NEWLINE# #UNINDENT# producer . stopProducing = brokenStopProducing #NEWLINE# request = Request ( b'GET' , b'/' , _boringHeaders , brokenStopProducing ) #NEWLINE# request . writeTo ( self . transport ) #NEWLINE# request . stopWriting ( ) #NEWLINE# self . assertEqual ( len ( self . flushLoggedErrors ( ArbitraryException ) ) , 1 )