#NEWLINE# def test_systemDeprecatedWriteFailure( self ) : #NEWLINE# #INDENT# '\n        L{writeTraceback} warns with C{DeprecationWarning} if a C{system}\n        argument is passed in.\n        ' #NEWLINE# if ( Failure is None ) : #NEWLINE# #INDENT# raise SkipTest ( 'Twisted unavailable' ) #NEWLINE# #UNINDENT# logger = MemoryLogger ( ) #NEWLINE# with catch_warnings ( record = True ) as warnings : #NEWLINE# #INDENT# simplefilter ( 'always' ) #NEWLINE# try : #NEWLINE# #INDENT# raise Exception ( ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# writeFailure ( Failure ( ) , logger , 'system' ) #NEWLINE# #UNINDENT# self . assertEqual ( warnings [ ( - 1 ) ] . category , DeprecationWarning )