From 05ae041220d9af460838399756b3edbe7fca2bec Mon Sep 17 00:00:00 2001 From: Sergey Silaev Date: Mon, 12 Oct 2026 08:33:47 +0200 Subject: [PATCH] test(installer): cover the remote curl-to-bash install path end to end (#898) Nice, this locks in the remote install path and keeps the model size check working on Python 3.13. --- tests/test_recognition_manager_core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_recognition_manager_core.py b/tests/test_recognition_manager_core.py index 1261404..5695faf 100644 --- a/tests/test_recognition_manager_core.py +++ b/tests/test_recognition_manager_core.py @@ -730,8 +730,8 @@ class TestWhispercppInitialization(unittest.TestCase): return_value=(mock_backend, {}), ): with patch("os.path.exists", return_value=True): - with patch("os.stat") as mock_stat: - mock_stat.return_value.st_size = 1000000 + # Keep file-type checks in shutil.which working on Python 3.13. + with patch("os.path.getsize", return_value=1000000): # Should convert invalid model to "tiny" manager = SpeechRecognitionManager( engine="whisper_cpp", model_size="invalid", defer_download=True