#NEWLINE# @ unittest . skipIf ( ( wmi is None ) , 'wmi module is not installed' ) #NEWLINE# def test_net_if_stats( self ) : #NEWLINE# #INDENT# ps_names = set ( cext . net_if_stats ( ) ) #NEWLINE# wmi_adapters = wmi . WMI ( ) . Win32_NetworkAdapter ( ) #NEWLINE# wmi_names = set ( ) #NEWLINE# for wmi_adapter in wmi_adapters : #NEWLINE# #INDENT# wmi_names . add ( wmi_adapter . Name ) #NEWLINE# wmi_names . add ( wmi_adapter . NetConnectionID ) #NEWLINE# #UNINDENT# self . assertTrue ( ( ps_names & wmi_names ) , ( 'no common entries in %s, %s' % ( self , wmi_names ) ) )