gh-89545: Updates platform module to use new internal _wmi module on Windows to directly query OS properties (GH-96289)

This commit is contained in:
Steve Dower 2022-09-07 21:09:20 +01:00 committed by GitHub
parent 4114bcc9ef
commit de33df27aa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 856 additions and 88 deletions

View file

@ -419,6 +419,17 @@ def test_sys_getframe():
sys._getframe()
def test_wmi_exec_query():
import _wmi
def hook(event, args):
if event.startswith("_wmi."):
print(event, args[0])
sys.addaudithook(hook)
_wmi.exec_query("SELECT * FROM Win32_OperatingSystem")
if __name__ == "__main__":
from test.support import suppress_msvcrt_asserts