You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix flaky test in CI: mock subprocess.run in retry tests
The test_transcribe_audio_retries_on_failure test was failing in CI
with 5 sleep calls instead of the expected 2. This was caused by
unmocked subprocess.run calls (ffprobe) inside the retry loop,
which behaved differently in the CI environment.
Changes:
- Added @patch for subprocess.run in both retry test methods
- Properly configured Path mock to handle .stat().st_size calls
- Mock ffprobe to return consistent results
This makes the tests more isolated and deterministic across
different environments.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
0 commit comments