From 4b599cfefda9d9d8f17cf750ec19933a0030a6ba Mon Sep 17 00:00:00 2001 From: Vito Sansevero Date: Thu, 29 Oct 2026 14:33:23 -0700 Subject: [PATCH] test(trash): count a volume that unmounted after a busy detach as detached (#499) On macos-15-intel a detach that reported "Resource busy" finished afterwards, so the retry found no such volume (portability run 40957282805). The loop now checks os.path.ismount before each attempt. --- tests/test_trash_macos_native.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_trash_macos_native.py b/tests/test_trash_macos_native.py index b5599128..f183928f 100644 --- a/tests/test_trash_macos_native.py +++ b/tests/test_trash_macos_native.py @@ -78,6 +78,8 @@ def _detach(mount): return f"this test still held files open under {mount}: {ours}" deadline = time.monotonic() + DETACH_WAIT_SECONDS while True: + if not os.path.ismount(mount): + return None # a "busy" detach can still finish after it returns done = _hdiutil("detach", mount) if done.returncode == 0: return None