#NEWLINE# def test_from_data( self , _ ) : #NEWLINE# #INDENT# command = execcmd . BaseCommand . from_data ( b'test' ) #NEWLINE# self . assertIsInstance ( command , execcmd . BaseCommand ) #NEWLINE# self . assertTrue ( os . path . exists ( command . _target_path ) , command . _target_path ) #NEWLINE# self . addCleanup ( _remove_file , command . _target_path ) #NEWLINE# with open ( command . _target_path ) as stream : #NEWLINE# #INDENT# data = stream . read ( ) #NEWLINE# #UNINDENT# self . assertEqual ( 'test' , data ) #NEWLINE# command . _cleanup ( ) #NEWLINE# self . assertFalse ( os . path . exists ( command . _target_path ) , command . _target_path )