#NEWLINE# @ unittest2 . skipUnless ( socket_auth , 'connection to unix_socket required' ) #NEWLINE# @ unittest2 . skipIf ( socket_found , 'socket plugin already installed' ) #NEWLINE# def testSocketAuthInstallPlugin( self ) : #NEWLINE# #INDENT# cur = self . connections [ 0 ] . cursor ( ) #NEWLINE# try : #NEWLINE# #INDENT# cur . execute ( "install plugin auth_socket soname 'auth_socket.so'" ) #NEWLINE# TestAuthentication . socket_found = True #NEWLINE# self . socket_plugin_name = 'auth_socket' #NEWLINE# self . realtestSocketAuth ( ) #NEWLINE# #UNINDENT# except pymysql . err . InternalError : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# cur . execute ( "install soname 'auth_socket'" ) #NEWLINE# TestAuthentication . socket_found = True #NEWLINE# self . socket_plugin_name = 'unix_socket' #NEWLINE# self . realtestSocketAuth ( ) #NEWLINE# #UNINDENT# except pymysql . err . InternalError : #NEWLINE# #INDENT# TestAuthentication . socket_found = False #NEWLINE# raise unittest2 . SkipTest ( "we couldn't install the socket plugin" ) #NEWLINE# #UNINDENT# #UNINDENT# finally : #NEWLINE# #INDENT# if TestAuthentication . socket_found : #NEWLINE# #INDENT# cur . execute ( ( 'uninstall plugin %s' % self . socket_plugin_name ) )