Skip to content

Add conftest fixture to transcribe-streaming integration tests#55

Open
Alan4506 wants to merge 4 commits intoawslabs:developfrom
Alan4506:feat/transcribe-streaming-conftest
Open

Add conftest fixture to transcribe-streaming integration tests#55
Alan4506 wants to merge 4 commits intoawslabs:developfrom
Alan4506:feat/transcribe-streaming-conftest

Conversation

@Alan4506
Copy link
Copy Markdown
Contributor

Description of changes:

This PR refactors Transcribe Streaming integration tests, by replacing the standalone setup_resources.py script with a session-scoped pytest fixture in conftest.py. This aligns with the pattern of Lex Runtime V2 integration tests. The HealthScribe test (test_get_medical_scribe_stream) previously required manually running the setup script and exporting environment variables before running tests. Now the IAM role and S3 bucket are automatically created and torn down per test session.

Changes:

  • Added conftest.py with healthscribe_resources fixture (creates IAM role + S3 bucket, tears down after)
  • Updated test_non_streaming.py to use the fixture instead of environment variables
  • Added UUID suffix to role and bucket names to avoid race conditions in parallel runs

To run the integration tests, you should do the following under clients/aws-sdk-transcribe-streaming:

uv venv .venv
source .venv/bin/activate
uv pip install --group test -e . boto3
python -m pytest tests/integration

All tests should pass.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@Alan4506 Alan4506 requested a review from a team as a code owner April 23, 2026 21:59
Comment thread clients/aws-sdk-transcribe-streaming/tests/integration/conftest.py
@Alan4506 Alan4506 force-pushed the feat/transcribe-streaming-conftest branch from 3367165 to 304d386 Compare May 8, 2026 14:14
Comment thread clients/aws-sdk-transcribe-streaming/tests/integration/conftest.py Outdated
Comment thread clients/aws-sdk-transcribe-streaming/tests/integration/conftest.py
Comment thread clients/aws-sdk-transcribe-streaming/tests/integration/test_non_streaming.py Outdated
Comment thread clients/aws-sdk-transcribe-streaming/tests/integration/conftest.py Outdated
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