From 86c95539caf0d5042a2470bed77aeed53ddea912 Mon Sep 17 00:00:00 2001 From: goodboy Date: Sun, 1 Mar 2026 18:52:48 -0500 Subject: [PATCH] Loosen shml test assert for key shortening on macos --- tests/test_shm.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/tests/test_shm.py b/tests/test_shm.py index ddeb67aa..00a36f8a 100644 --- a/tests/test_shm.py +++ b/tests/test_shm.py @@ -2,6 +2,7 @@ Shared mem primitives and APIs. """ +import platform import uuid # import numpy @@ -53,7 +54,18 @@ def test_child_attaches_alot(): shm_key=shml.key, ) 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 portal.cancel_actor()