You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
458 B
18 lines
458 B
6 years ago
|
from win32com.client import GetObject
|
||
|
import win32com.test.util
|
||
|
|
||
|
import unittest
|
||
|
|
||
|
class Simple(win32com.test.util.TestCase):
|
||
|
def testit(self):
|
||
|
cses = GetObject("WinMgMts:").InstancesOf("Win32_Process")
|
||
|
vals = []
|
||
|
for cs in cses:
|
||
|
val = cs.Properties_("Caption").Value
|
||
|
vals.append(val)
|
||
|
self.failIf(len(vals)<5, "We only found %d processes!" % len(vals))
|
||
|
|
||
|
if __name__=='__main__':
|
||
|
unittest.main()
|
||
|
|