diff --git a/tests/test_issue31_purge_residual.py b/tests/test_issue31_purge_residual.py index bb21e4d..898d1c1 100644 --- a/tests/test_issue31_purge_residual.py +++ b/tests/test_issue31_purge_residual.py @@ -312,7 +312,9 @@ def test_any_spelling_of_the_uuid_is_the_lowercase_session(home, tmp_path, conv, live.kill() live.wait() - named = subprocess.Popen(["sh", "-c", "sleep 120", conv]) + # Not `sh -c "sleep 120" `: a shell execs its last simple command + # and the uuid would vanish from the process list (macOS /bin/sh). + named = subprocess.Popen([sys.executable, "-c", "import time; time.sleep(120)", conv]) try: time.sleep(0.05) assert adapter.conversation_in_use(other, ctx) is True, "a command line naming the lowercase id"