-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tests: Add base64 test for audio endpoint #414
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
This pull request adds tests for base64-encoded audio input in the audio embedding endpoint, enhancing the test coverage for audio embeddings as requested in issue #378.
- Added test_audio_base64() to verify successful processing of base64-encoded audio input
- Implemented test_audio_base64_fail() to handle invalid base64 input scenarios
- Refactored audio URL to use pytest.AUDIO_SAMPLE_URL fixture for consistency
- Improved test coverage for audio embedding functionality, addressing the need for more robust testing of audio inputs
1 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #414 +/- ##
=======================================
Coverage 79.22% 79.22%
=======================================
Files 40 40
Lines 3167 3167
=======================================
Hits 2509 2509
Misses 658 658 ☔ View full report in Codecov by Sentry. |
nice test, thanks! |
This pull request updates the end-to-end tests for the
torch_audio
module inlibs/infinity_emb
. The main changes include refactoring the audio URL usage and adding new tests for base64-encoded audio.Refactoring:
libs/infinity_emb/tests/end_to_end/test_torch_audio.py
: Replaced hardcoded audio URLs withpytest.AUDIO_SAMPLE_URL
in multiple test functions. [1] [2] [3]New Tests:
libs/infinity_emb/tests/end_to_end/test_torch_audio.py
: Addedtest_audio_base64
to verify that the API correctly processes base64-encoded audio.libs/infinity_emb/tests/end_to_end/test_torch_audio.py
: Addedtest_audio_base64_fail
to ensure the API returns an appropriate error for invalid base64-encoded audio.Dependency Updates:
libs/infinity_emb/tests/end_to_end/test_torch_audio.py
: Added imports forbase64
andrequests
to support new test cases.Addition to Add a End-to-end unit test for image embeddings and audio embeddings #378