#NEWLINE# def test_nic_names( self ) : #NEWLINE# #INDENT# p = subprocess . Popen ( [ 'ipconfig' , '/all' ] , stdout = subprocess . PIPE ) #NEWLINE# out = p . communicate ( ) [ 0 ] #NEWLINE# if PY3 : #NEWLINE# #INDENT# out = str ( out , ( sys . stdout . encoding or sys . getfilesystemencoding ( ) ) ) #NEWLINE# #UNINDENT# nics = psutil . net_io_counters ( pernic = True ) . keys ( ) #NEWLINE# for nic in nics : #NEWLINE# #INDENT# if ( 'pseudo-interface' in nic . replace ( ' ' , '-' ) . lower ( ) ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# if ( nic not in out ) : #NEWLINE# #INDENT# self . fail ( ( "%r nic wasn't found in 'ipconfig /all' output" % self ) )