test: add unit tests for the sync (SyncTranscriber) client#216
Draft
ccampbell-aai wants to merge 1 commit into
Draft
test: add unit tests for the sync (SyncTranscriber) client#216ccampbell-aai wants to merge 1 commit into
ccampbell-aai wants to merge 1 commit into
Conversation
The sync client (`assemblyai.sync`, `SyncTranscriber`) currently has no test coverage in this repository. These two suites existed only in AssemblyAI's internal monorepo, where they were the sole automated coverage for the sync client. As SDK development moves to this public repo as the source of truth, they're upstreamed here so sync stays covered — it's under active development (keyterms rename, `warm()` pre-warming, latency work). - test_sync.py: request/response behavior (bytes/PCM/WAV input, config serialization, model header routing, warm(), error mapping, timeouts). - test_sync_backwards_compat.py: the flat `assemblyai.sync` / `sync_api` re-export shims still resolve after the sync/v1 restructure. Import paths were re-rooted from the internal package path to `assemblyai.*`. Verified locally: `pytest tests/unit/test_sync.py tests/unit/test_sync_backwards_compat.py` → 38 passed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds unit tests for the sync client (
assemblyai.sync,SyncTranscriber), which currently has no test coverage in this repo.tests/unit/test_sync.py— request/response behavior: bytes / raw-PCM / WAV input routing, config serialization,X-AAI-Modelheader,warm()pre-warming, error mapping (SyncTranscriptError), client-side timeout.tests/unit/test_sync_backwards_compat.py— the flatassemblyai.sync/assemblyai.sync_apire-export shims still resolve after thesync/v1restructure.Why
These suites lived only in AssemblyAI's internal monorepo, where until now they were the sole automated coverage for the sync client. As SDK development moves to this public repo as the source of truth (the internal copy is being de-vendored and materialized from here at build time), that internal coverage would otherwise disappear. Sync is under active development — keyterms rename,
warm(), latency work — so it shouldn't go untested.Notes
assemblyai.*; no test logic changed.pytest-httpx(already intox.ini).pytest tests/unit/test_sync.py tests/unit/test_sync_backwards_compat.py→ 38 passed.