#NEWLINE# @ unittest . skipUnless ( hasattr ( psutil . Process , 'ionice' ) , 'Linux and Windows Vista only' ) #NEWLINE# def test_ionice_set( self ) : #NEWLINE# #INDENT# if WINDOWS : #NEWLINE# #INDENT# value = psutil . Process ( ) . ionice ( ) #NEWLINE# self . execute ( 'ionice' , value ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# from psutil._pslinux import cext #NEWLINE# self . execute ( 'ionice' , psutil . IOPRIO_CLASS_NONE ) #NEWLINE# fun = functools . partial ( cext . proc_ioprio_set , os . getpid ( ) , ( - 1 ) , 0 ) #NEWLINE# self . execute_w_exc ( OSError , self )