-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
bpo-34279: Issue a warning if no tests have been executed #10150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
db823cb
bpo-34279: Issue a warning if no tests have been executed
pablogsal 318e4bb
Display list of tests that did not execute any test
pablogsal 2272ba8
Always print 'NO TEST RUN' as a result if any test did not run
pablogsal 9c7e7b5
Revert "Always print 'NO TEST RUN' as a result if any test did not run"
pablogsal 5253a97
Move the NEWS entry to the test category
pablogsal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
3 changes: 3 additions & 0 deletions
3
Misc/NEWS.d/next/Tests/2018-10-27-13-41-55.bpo-34279.v0Xqxe.rst
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
regrtest issue a warning when no tests have been executed in a particular | ||
test file. Also, a new final result state is issued if no test have been | ||
executed across all test files. Patch by Pablo Galindo. |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think of always appending "NO TEST RUN" if run_no_tests is non-empty?
"./python -m test -j0 test_os test_sys -m test_access" would say "Tests result: SUCCESS, NO TEST RUN".
Does it sound weird to you?
My expectation is that "SUCCESS, NO TEST RUN" would be rare. You would only get it if you pass --match. But if you get it, it means that maybe you did a mistake. That's why the exit code is 0 (success) and not 1 (error). It's just a hint, not an hard error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hummmm..... I think is a good idea. What do you think about somethink on the lines of:
only if the output is SUCCESS? So basically:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that it's useful. And I prefer "NO TEST RUN" because it's shorter :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pablogsal: what do you think? ping?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the late response.
I agree, I think printing "NO TEST RUN" when there is at least one item in
run_no_tests
is a good idea :)I implemented it in 8a64c0b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait, I am checking somethig that is not fully correct with that commit.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As we are setting "SUCCESS" only when there are no other thing inresult
this means that running./python -m test -j0 test_os -m test_no_existing
will also result in:Tests result: SUCCESS, NO TEST RUNas to achieve the result for"./python -m test -j0 test_os test_sys -m test_access"
we would need to append after the "SUCCESS" is added:otherwise, you never will get "SUCCESS" when "self.run_no_test" is populated.I suposse that is not what we want. What do you think?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, nervermind. I implemented it in 2272ba8 so only
Tests result: SUCCESS, NO TEST RUN
will happen if there is at least one test that succeeds and some did not run but onlyNO TEST RUN
appears if no test at all have ran. Some examples: