MCPcopy Index your code
hub / github.com/python/cpython / test_wmi_query_multiple_rows

Method test_wmi_query_multiple_rows

Lib/test/test_wmi.py:70–81  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

68 wmi_exec_query("SELECT * FROM CIM_DataFile")
69
70 def test_wmi_query_multiple_rows(self):
71 # Multiple instances should have an extra null separator
72 r = wmi_exec_query("SELECT ProcessId FROM Win32_Process WHERE ProcessId < 1000")
73 self.assertNotStartsWith(r, "\0")
74 self.assertNotEndsWith(r, "\0")
75 it = iter(r.split("\0"))
76 try:
77 while True:
78 self.assertRegex(next(it), r"ProcessId=\d+")
79 self.assertEqual("", next(it))
80 except StopIteration:
81 pass
82
83 def test_wmi_query_threads(self):
84 from concurrent.futures import ThreadPoolExecutor

Callers

nothing calls this directly

Calls 6

wmi_exec_queryFunction · 0.85
assertNotStartsWithMethod · 0.80
assertNotEndsWithMethod · 0.80
assertRegexMethod · 0.80
splitMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected