Fix unittest test ID format in utils unit tests #40
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.
Two unit tests in
utils.unit.test.tswere failing due to incorrect test ID format expectations. The tests assumed unittest test IDs had no separator between filename and class name, but the implementation correctly uses backslash separators.Changes
'a/b/c.pyMyClass'to'a/b/c.py\\MyClass'to match the backslash-separated format thatidToModuleClassMethodexpectsutils.clipboardWriteTexttoenv.clipboard.writeText- stubbing exported functions doesn't affect internal module calls in the same modulewriteTestIdToClipboardto always callclipboardWriteTextwrapper instead of mixing directenv.clipboard.writeTextcallsExample
The unittest ID format uses backslashes to delimit:
filepath\\ClassName\\method_name, which the implementation splits and converts tomodule.ClassName.method_name.Original prompt
continue with assessment and fix of test to align with new changes
[Chronological Review: The conversation began with the user requesting edits to a pull request (PR) related to the `controller.ts` file. The user outlined specific changes, including switching to an existing file, changing syntax, improving code readability, adding logging, and documenting design considerations. The user then reported compilation errors in the same file, indicating unused variables. Following this, the user questioned the purpose of certain variables and whether the PR was merely updating legacy code. The user expressed a desire to mark certain items and suggested a staged approach to the complex switch in architecture. Finally, the user requested an assessment of the testing architecture and a proposal for necessary updates to tests.][Intent Mapping:
[Technical Inventory:
/Users/eleanorboyd/vscode-python/src/client/testing/testController/controller.ts- Contains the main logic for the test controller.vsIdToProject,fileUriToProject,projectToVsIds,workspaceDiscoveryState- Declared but not used, leading to compilation errors.[Code Archaeology:
controller.tsand other files, but specific changes were not detailed in the conversation.[Progress Assessment:
[Context Validation: All critical information for continuation is captured, including user requests for edits, clarifications, and assessments.]
[Recent Commands Analysis:
controller.ts, indicating unused variables.1. Conversation Overview: - Primary Objectives: - "I have some edits I want to make." - "Run all the tests and do an assessment of the status of which tests need to be updated." - Session Context: The user is working on a PR for the `controller.ts` file, addressing edits, compilation errors, and the testing architecture. - User Intent Evolution: The user initially focused on specific edits, then shifted to understanding the implications of the PR and the need for a structured approach to testing.- Technical Foundation:
- TypeScript: Used for the
- Logging: User requested to implement logging for better traceability.
- Codebase Status:
- File Name:
- Purpose: Main logic for the test controller.
- Current State: Contains compilation errors due to unused variables.
- Key Code Segments: Variables like
- Dependencies: Relies on the overall testing architecture.
- Problem Resolution:
- Issues Encountered: Compilation errors due to unused variables.
- Solutions Implemented: User is seeking to clarify the purpose of these variables and their necessity.
- Debugging Context: Ongoing assessment of the testing architecture and its alignment with the new design.
- Progress Tracking:
- Completed Tasks: User has outlined specific edits for the PR.
- Partially Complete Work: Compilation errors need to be resolved, and the testing architecture needs assessment.
- Validated Outcomes: None confirmed yet due to ongoing issues.
- Active Work State:
- Current Focus: User is assessing the complexity of the switch in architecture and the implications for testing.
- Recent Context: User is questioning the nature of the PR and its effectiveness in transitioning to a new architecture.
- Working Code: The
- Immediate Context: User is concerned about the testing architecture and its alignment with the new design.
- Recent Operations:
- Last Agent Com...
controller.tsfile, which is part of the testing framework.controller.tsvsIdToProject,fileUriToProject, etc., are declared but not utilized.controller.tsfile is being modified.Created from VS Code.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.