Various improvements for test output#6822
Open
matthewhughes934 wants to merge 4 commits intorust-lang:mainfrom
Open
Various improvements for test output#6822matthewhughes934 wants to merge 4 commits intorust-lang:mainfrom
matthewhughes934 wants to merge 4 commits intorust-lang:mainfrom
Conversation
To stop referencing parameters `out` and `config` that were both moved into the `Session` object with 71d3d04
Move this to be with all the other tests for this config option
I find otherwise the test output can be a bit noisy, and in particular the error messages make me think some test somewhere failed when even when it's all passing.
This was added with f7a25a1, this was to address an issue with the worthy goal[1]: > It is probably worth auditing the tests and where they are not deliberately testing an option, removing any options they set. However, given the number of warnings this produces: $ cargo test -- --nocapture |& grep -c 'Default value.*used explicitly' 236 I think this approach did not work, one could enforce this approach by changing this to be an error, but I think there are valid cases to use defaults, e.g. a reproduction of an issue relating to line length uses the default `max_width`: it's simplest to add a test verifying the behaviour with an explicit `max_width: 100` rather than adjusting the reproduction. Link: rust-lang#1720 [1]
Contributor
|
r? @ytmimi |
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.
The main focus on this changeset is to reduce some noise that was
annoying me in test output (particularly in test failures)
There are still some compile errors outputted during tests (on failure
or with
--nocapturedue to doctests withcompile_fail(there's anopen issue about this[1])
Link: rust-lang/rust#55813 [1]
Update docs for
Session.formatTo stop referencing parameters
outandconfigthat were both movedinto the
Sessionobject with 71d3d04Move stray
imports_granularitytestMove this to be with all the other tests for this config option
Silence expected parser error
I find otherwise the test output can be a bit noisy, and in particular
the error messages make me think some test somewhere failed when even
when it's all passing.
Remove warning on explicit default config value in tests
This was added with f7a25a1, this was
to address an issue with the worthy goal[1]:
However, given the number of warnings this produces:
I think this approach did not work, one could enforce this approach by
changing this to be an error, but I think there are valid cases to use
defaults, e.g. a reproduction of an issue relating to line length uses
the default
max_width: it's simplest to add a test verifying thebehaviour with an explicit
max_width: 100rather than adjusting thereproduction.
Link: improve test coverage for defaults #1720 [1]