[WIP] Set exit code to 5 when no tests are collected#199
Draft
[WIP] Set exit code to 5 when no tests are collected#199
Conversation
|
@Copilot your pull request is missing a changelog! |
Co-authored-by: anapaulagomes <1899950+anapaulagomes@users.noreply.github.com>
Co-authored-by: anapaulagomes <1899950+anapaulagomes@users.noreply.github.com>
Copilot stopped work on behalf of
anapaulagomes due to an error
October 15, 2025 09:53
anapaulagomes
requested changes
Oct 15, 2025
Owner
anapaulagomes
left a comment
There was a problem hiding this comment.
Please add a line to the CHANGELOG file!
|
|
||
|
|
||
| def test_exit_code_1_when_tests_fail_with_picked(testdir): | ||
| """Verify exit code 1 (TESTS_FAILED) when changed tests fail""" |
Owner
There was a problem hiding this comment.
The names of the tests are clear enough, so there's no need for docstrings in them.
anapaulagomes
requested changes
Oct 15, 2025
Owner
anapaulagomes
left a comment
There was a problem hiding this comment.
Need to actually implement the changes 😋
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.
Summary
The plugin already returns exit code 5 (NO_TESTS_COLLECTED) when no tests are collected with
--picked. This PR adds:Three new tests to ensure this behavior is maintained:
--picked--picked=first(all tests run)--pickedDocumentation in README explaining the exit code behavior to help users understand how the plugin respects pytest's standard exit codes
Original prompt
Fixes #145
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.