Allow code editors to collect tests#5997
Merged
florentinl merged 1 commit intomainfrom Jan 12, 2026
Merged
Conversation
Contributor
|
|
238b334 to
68937ab
Compare
cbeauchesne
approved these changes
Jan 12, 2026
Collaborator
cbeauchesne
left a comment
There was a problem hiding this comment.
A small non blocking comment.
I changed the title, as this PR definitly deserves a change log mention.
TYVM !
| data = data.replace(secret, "--redacted--") | ||
|
|
||
| original_write(data) | ||
| return original_write(data) |
Collaborator
There was a problem hiding this comment.
Is this change belongs to this PR ?
Contributor
Author
There was a problem hiding this comment.
Yes, the vscode extension injects a pytest plugin that inherits the wrapped write and needs its return value. Otherwise the test discovery crashes.
florentinl
added a commit
that referenced
this pull request
Jan 12, 2026
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.
Motivation
The goal of this PR is to fix calling
pytestwith--collect-only.This allows using the vscode python extension to collect, run and debug system-tests.
Changes
Guard scenario cleanup for
--collect-onlyGuard scenario properties for
--collect-only(as querying values such as weblog version will fail without running containers)Return the number of bytes written when patching the write function for scrubbing (the vscode_pytest plugin inherits this wrapped write function to write to a pipe and relies on this behavior of the original write function)
Workflow
🚀 Once your PR is reviewed and the CI green, you can merge it!
🛟 #apm-shared-testing 🛟
Reviewer checklist
tests/ormanifests/is modified ? I have the approval from R&P teambuild-XXX-imagelabel is present