#NEWLINE# def test_error_logged_if_deferred_not_supported( self ) : #NEWLINE# #INDENT# test_signal = object ( ) #NEWLINE# test_handler = ( lambda : defer . Deferred ( ) ) #NEWLINE# dispatcher . connect ( test_handler , test_signal ) #NEWLINE# with LogCapture ( ) as l : #NEWLINE# #INDENT# send_catch_log ( test_signal ) #NEWLINE# #UNINDENT# self . assertEqual ( len ( l . records ) , 1 ) #NEWLINE# self . assertIn ( 'Cannot return deferreds from signal handler' , str ( l ) ) #NEWLINE# dispatcher . disconnect ( test_handler , test_signal )