Skip to content

test(integrations): per-version VCR cassette directories#299

Merged
Abhijeet Prasad (AbhiPrasad) merged 7 commits intomainfrom
abhi-feat-per-version-vcr-cassettes
Apr 15, 2026
Merged

test(integrations): per-version VCR cassette directories#299
Abhijeet Prasad (AbhiPrasad) merged 7 commits intomainfrom
abhi-feat-per-version-vcr-cassettes

Conversation

@AbhiPrasad
Copy link
Copy Markdown
Member

@AbhiPrasad Abhijeet Prasad (AbhiPrasad) commented Apr 15, 2026

In prep for #256, we record vcr cassettes per version. Large diff, but that's just because we now have these duplicate cassettes. Also re-org noxfile for these changes.

Nox sessions now pass BRAINTRUST_TEST_PACKAGE_VERSION to pytest so each
version under test records and replays cassettes from its own subdirectory
(e.g. cassettes/latest/, cassettes/0.50.0/).

Key changes:
- New integrations/conftest.py with a shared vcr_cassette_dir fixture that
  appends the version when the env var is set, falling back to cassettes/
  for backward compat when running tests directly.
- _run_tests() accepts version= and sets the env var for all 16 versioned
  integration sessions.
- Removed redundant per-file vcr_cassette_dir fixtures and
  cassette_library_dir overrides from 12 test/conftest files.
- Claude Agent SDK _test_transport respects the version env var for its
  non-VCR cassette transport, avoiding double-nesting when
  BRAINTRUST_CLAUDE_AGENT_SDK_CASSETTES_DIR is explicitly set.
- All existing cassettes moved to cassettes/latest/ subdirectories.
@AbhiPrasad Abhijeet Prasad (AbhiPrasad) marked this pull request as ready for review April 15, 2026 21:08
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stamp

@AbhiPrasad Abhijeet Prasad (AbhiPrasad) changed the title feat(integrations): per-version VCR cassette directories test(integrations): per-version VCR cassette directories Apr 15, 2026
@AbhiPrasad Abhijeet Prasad (AbhiPrasad) merged commit c81ccaf into main Apr 15, 2026
84 checks passed
@AbhiPrasad Abhijeet Prasad (AbhiPrasad) deleted the abhi-feat-per-version-vcr-cassettes branch April 15, 2026 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants