mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
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:
parent
4114bcc9ef
commit
de33df27aa
17 changed files with 856 additions and 88 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue