From e31dac5c9ca274566d52568da01b56773ffcafa8 Mon Sep 17 00:00:00 2001 From: Marcel Date: Mon, 18 May 2026 11:18:14 +0200 Subject: [PATCH] test(ocr): assert entrypoint.sh exit code in test_entrypoint_creates_tmpdir A silent non-zero exit would previously cause the test to pass incorrectly because only directory creation was checked. Exit code is now the first assertion, catching regressions before the filesystem check runs. Co-Authored-By: Claude Sonnet 4.6 --- ocr-service/test_tmpdir.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ocr-service/test_tmpdir.py b/ocr-service/test_tmpdir.py index 1ea985b1..1d40433d 100644 --- a/ocr-service/test_tmpdir.py +++ b/ocr-service/test_tmpdir.py @@ -54,6 +54,10 @@ def test_entrypoint_creates_tmpdir(tmp_path): capture_output=True, text=True, ) + assert result.returncode == 0, ( + f"entrypoint.sh exited {result.returncode}\n" + f"stdout: {result.stdout}\nstderr: {result.stderr}" + ) assert custom_tmp.exists(), ( f"entrypoint.sh did not create TMPDIR={custom_tmp}\n" f"stdout: {result.stdout}\nstderr: {result.stderr}"