mirror of
https://github.com/python/cpython.git
synced 2025-08-10 03:49:18 +00:00
gh-119690: Adds Unicode support for named pipes in _winapi (GH-119717)
Also backports a minor improvement to test_audit.
This commit is contained in:
parent
fae9c92ba7
commit
e85e813bf1
6 changed files with 98 additions and 35 deletions
|
@ -269,6 +269,20 @@ class AuditTest(unittest.TestCase):
|
|||
|
||||
self.assertEqual(actual, expected)
|
||||
|
||||
def test_winapi_createnamedpipe(self):
|
||||
winapi = import_helper.import_module("_winapi")
|
||||
|
||||
pipe_name = r"\\.\pipe\LOCAL\test_winapi_createnamed_pipe"
|
||||
returncode, events, stderr = self.run_python("test_winapi_createnamedpipe", pipe_name)
|
||||
if returncode:
|
||||
self.fail(stderr)
|
||||
|
||||
if support.verbose:
|
||||
print(*events, sep='\n')
|
||||
actual = [(ev[0], ev[2]) for ev in events]
|
||||
expected = [("_winapi.CreateNamedPipe", f"({pipe_name!r}, 3, 8)")]
|
||||
|
||||
self.assertEqual(actual, expected)
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue