#NEWLINE# def test_warn_on_io_error( self ) : #NEWLINE# #INDENT# self . mock_paths = [ '/path/to/logs/oak' , IOError ( ) ] #NEWLINE# with no_handlers_for_logger ( 'mrjob.logs.wrap' ) : #NEWLINE# #INDENT# stderr = StringIO ( ) #NEWLINE# log_to_stream ( 'mrjob.logs.wrap' , self ) #NEWLINE# self . assertEqual ( self . _ls_logs ( [ [ '/path/to/logs' ] ] ) , [ dict ( path = '/path/to/logs/oak' ) ] ) #NEWLINE# self . mock_fs . ls . assert_called_once_with ( '/path/to/logs' ) #NEWLINE# self . assertIn ( "couldn't ls() /path/to/logs" , stderr . getvalue ( ) )