Refactor testing functions to use correct naming scheme#164
Merged
cleemullins merged 1 commit intomainfrom Oct 13, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR refactors function names in test files to prevent PyTest from incorrectly identifying them as test cases. Functions that previously started with "test" but were utility functions for creating test objects are renamed to start with "create_" instead.
- Renamed utility functions from
testing_*tocreate_testing_*pattern - Updated all references to use the new naming scheme
- Removed extraneous blank lines for cleaner formatting
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/hosting_core/app/_oauth/_common.py | Renamed utility functions testing_Activity, testing_TurnContext, and testing_TurnContext_magic to use create_ prefix |
| tests/hosting_core/app/_oauth/test_authorization.py | Updated imports and references to use new function names |
| tests/hosting_core/app/_oauth/_handlers/test_user_authorization.py | Updated function definition and reference to use new naming scheme |
| tests/hosting_core/app/_oauth/_handlers/test_agentic_user_authorization.py | Updated import and reference to use new function names |
| tests/hosting_core/_oauth/test_oauth_flow.py | Updated function definition and reference to use new naming scheme |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
rodrigobr-msft
approved these changes
Oct 13, 2025
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.
Fixes #163
A half dozen methods started with "test" that were not intended to be actual tests. PyTest tries to run these and generates warnings as their return types are not correct. This results in PyTest warnings that look like:
Pytest picks up any function/class that starts with "test" as an actual test. The easiest fix for these is to simply rename them to NOT start with test. All functions encoutered as part of this are actually creating Mocks or similar testing entities for use by other tests.