GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — gh-62432: Return unsuccessfully if no unit tests were run by mgorny · Pull Request #24893 · python/cpython Conversation
|
|
This PR is stale because it has been open for 30 days with no activity. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| Returns ``False`` if there were any :attr:`unexpectedSuccesses` | ||
| from tests marked with the :func:`expectedFailure` decorator. | ||
|
|
||
| .. versionchanged:: 3.10b1 |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This will probably need to be 3.11 now.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| Return ``True`` if all tests run so far have passed, otherwise returns | ||
| ``False``. | ||
| Return ``True`` if all tests run so far have passed and at least one test | ||
| was found, otherwise returns ``False``. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
The code checks testsRun + testsSkipped > 0, so it's not exactly "was found" (what if many were found but we haven't started running anything yet?)
nit: I think it's easier to understand if the sentence lists the conditions chronologically, something like: "at least one test has been executed or skipped and no test has failed so far".
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| run = result.testsRun | ||
| self.stream.writeln("Ran %d test%s in %.3fs" % | ||
| (run, run != 1 and "s" or "", timeTaken)) | ||
| if run > 0 or len(result.skipped) > 0: |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I'd abstract the run > 0 or len(result.skipped) calculation as a method on TestResult, then you won't have it repeated twice. And you can give it a name indicating what it means.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
This was completed in 76632b8 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.