From 2ab030d12221a38d4fe03c4a285f88ddbd7e301c Mon Sep 17 00:00:00 2001 From: SandObserver <260779319+SandObserver@users.noreply.github.com> Date: Sat, 17 Oct 2026 14:08:21 -0400 Subject: [PATCH] Fix: wait for the killed OCR process in the stuck read test --- tests/test_ocr.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test_ocr.py b/tests/test_ocr.py index 1539986..fc81e24 100644 --- a/tests/test_ocr.py +++ b/tests/test_ocr.py @@ -61,6 +61,9 @@ def test_a_stuck_read_stops_the_ocr_process(monkeypatch: pytest.MonkeyPatch) -> ocr.read(Image.new("RGB", (480, 720))) assert ocr._process.pool is None assert time.monotonic() - started < 15 + deadline = time.monotonic() + 5 + while multiprocessing.active_children() and time.monotonic() < deadline: + time.sleep(0.1) assert not multiprocessing.active_children()