Loosen shml test assert for key shortening on macos

ns_aware
Gud Boi 2026-03-01 18:52:48 -05:00
parent 706a4b761b
commit 86c95539ca
1 changed files with 13 additions and 1 deletions

View File

@ -2,6 +2,7 @@
Shared mem primitives and APIs. Shared mem primitives and APIs.
""" """
import platform
import uuid import uuid
# import numpy # import numpy
@ -53,7 +54,18 @@ def test_child_attaches_alot():
shm_key=shml.key, shm_key=shml.key,
) as (ctx, start_val), ) as (ctx, start_val),
): ):
assert start_val == key assert (_key := shml.key) == start_val
if platform.system() != 'Darwin':
# XXX, macOS has a char limit..
# see `ipc._shm._shorten_key_for_macos`
assert (
start_val
==
key
==
_key
)
await ctx.result() await ctx.result()
await portal.cancel_actor() await portal.cancel_actor()