Funktionierender Prototyp des Serious Games zur Vermittlung von Wissen zu Software-Engineering-Arbeitsmodellen.
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.

testWMI.py 468B

1 year ago
123456789101112131415161718
  1. import unittest
  2. import win32com.test.util
  3. from win32com.client import GetObject
  4. class Simple(win32com.test.util.TestCase):
  5. def testit(self):
  6. cses = GetObject("WinMgMts:").InstancesOf("Win32_Process")
  7. vals = []
  8. for cs in cses:
  9. val = cs.Properties_("Caption").Value
  10. vals.append(val)
  11. self.assertFalse(len(vals) < 5, "We only found %d processes!" % len(vals))
  12. if __name__ == "__main__":
  13. unittest.main()