-
Notifications
You must be signed in to change notification settings - Fork 3.2k
use .test.env #44537
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
use .test.env #44537
Conversation
c8e7bc0 to
75cf61c
Compare
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.
Pull request overview
This pull request modernizes the test infrastructure to use a .test.env file for environment variables, replacing the previous prefixed naming scheme (azure_ai_projects_tests_*) with direct environment variable names (e.g., AZURE_AI_PROJECT_ENDPOINT). The changes include custom dotenv loading logic, refactored sample test executors, and comprehensive updates across all test files.
Key Changes
- Custom
.test.envfile loading with monkey-patched dotenv module in conftest.py - Simplified environment variable names from
azure_ai_projects_tests_*prefix to direct names likeAZURE_AI_PROJECT_ENDPOINT - Refactored sample test infrastructure with new
sample_executor.pyconsolidating sync/async executors and addingadditionalSampleTestsdecorator for optional environment variables
Reviewed changes
Copilot reviewed 55 out of 55 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
tests/conftest.py |
Adds custom .test.env loading by monkey-patching dotenv module |
tests/test_base.py |
Changes servicePreparer from prefixed names to direct env var names |
tests/samples/sample_executor.py |
New consolidated executor with sync/async classes and additional test support |
tests/samples/sample_executor_helpers.py |
Deleted (functionality moved to sample_executor.py) |
tests/samples/test_samples*.py |
Updated to use new executor API and env var names |
tests/samples/README.md |
Added comprehensive documentation for sample testing |
tests/samples/test_samples_helpers.py |
New file extracting shared test instructions |
tests/**/*.py (30+ files) |
Updated all test files to use new direct env var names |
samples/agents/tools/sample_agent_to_agent.py |
Added optional A2A_USER_INPUT env var support |
.gitignore |
Added .test.env to ignored files |
assets.json |
Updated test recording asset tag |
6ab2faa to
7a165f9
Compare
cdd449f to
30c2a36
Compare
30c2a36 to
19d96b1
Compare
Description
Please add an informative description that covers that changes made by the pull request and link all relevant issues.
If an SDK is being regenerated based on a new API spec, a link to the pull request containing these API spec changes should be included above.
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines