Preserve Pytest's exit code with ./pants test#10632
Merged
Eric-Arellano merged 2 commits intopantsbuild:masterfrom Aug 17, 2020
Merged
Preserve Pytest's exit code with ./pants test#10632Eric-Arellano merged 2 commits intopantsbuild:masterfrom
./pants test#10632Eric-Arellano merged 2 commits intopantsbuild:masterfrom
Conversation
# Rust tests and lints will be skipped. Delete if not intended. [ci skip-rust] # Building wheels and fs_util will be skipped. Delete if not intended. [ci skip-build-wheels]
./pants test./pants test
stuhood
approved these changes
Aug 17, 2020
Member
|
This looks good, although I do wonder whether the null object pattern here ("skipped" is playing the role of null) is the best fit. Would it be better to have an OptionalTestResult wrapper type here instead, to avoid complicating the internals of the type? |
Contributor
Author
|
Oh, sorry I merged before seeing that review. There are further tweaks to the model for streaming tests to work, which I'm about to put up. Let's discuss there. |
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.
This allows us to output the original exit code to the user, which is helpful because Pytest codes are significant.
This PR also fixes an issue with
test --debugunintentionally running onconftest.pyfiles. Per #10619, we special case that file to skip it.[ci skip-rust]
[ci skip-build-wheels]