gh-119690: Adds Unicode support for named pipes in _winapi (GH-119717)

This commit is contained in:
Steve Dower 2024-05-29 16:51:09 +01:00 committed by GitHub
parent 34f9b3e724
commit 78d697b7d5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 92 additions and 29 deletions

View file

@ -556,6 +556,17 @@ def test_sys_monitoring_register_callback():
sys.monitoring.register_callback(1, 1, None)
def test_winapi_createnamedpipe(pipe_name):
import _winapi
def hook(event, args):
if event == "_winapi.CreateNamedPipe":
print(event, args)
sys.addaudithook(hook)
_winapi.CreateNamedPipe(pipe_name, _winapi.PIPE_ACCESS_DUPLEX, 8, 2, 0, 0, 0, 0)
if __name__ == "__main__":
from test.support import suppress_msvcrt_asserts