Skip to content

test(tools): fix mocking for faster_whisper, Python 3.14 stat, and sy…#6375

Open
CharlieKerfoot wants to merge 1 commit into
NousResearch:mainfrom
CharlieKerfoot:fix/test-mocking-issues
Open

test(tools): fix mocking for faster_whisper, Python 3.14 stat, and sy…#6375
CharlieKerfoot wants to merge 1 commit into
NousResearch:mainfrom
CharlieKerfoot:fix/test-mocking-issues

Conversation

@CharlieKerfoot

Copy link
Copy Markdown
Contributor

Problem

  • Transcription tests fail on import when faster_whisper is not installed
  • test_stat_oserror fails on Python 3.14 because Path.exists()/Path.is_file() no longer delegate to Path.stat()
  • test_update_gateway_restart fails on non-Linux platforms because is_linux() isn't mocked

Fix

  • Inject a sys.modules stub for faster_whisper in both transcription test files
  • Simplify test_stat_oserror to patch Path.stat directly and assert the validation function returns an error (no call_count threshold)
  • Mock is_linux → True in the gateway restart test

Testing

  • All three test files pass on macOS with Python 3.14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low — cosmetic, nice to have tool/tts Text-to-speech and transcription type/test Test coverage or test infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants