Ignore cache when producing reports - #6076
Merged
Merged
Conversation
PythonCmdlineSuite uses DataDrivenTestCase, but inspects the test case properties rather than calling runtest(). Therefore it could parse tests with multiple steps, but during execution only one step was run.
If the cache is used, coverage information will only be reported for modules that were not in the cache. Fixes python#5103
mthuurne
force-pushed
the
coverage_ignore_cache
branch
from
December 17, 2018 06:18
e5bbe4d to
2844779
Compare
msullivan
requested changes
Dec 20, 2018
msullivan
left a comment
Collaborator
There was a problem hiding this comment.
One requested change about how to make the changes to the test framework.
Otherwise looks great!
| for step in [1] + sorted(testcase.output2): | ||
| try: | ||
| test_python_cmdline(testcase, step) | ||
| except AssertionError as ex: |
Collaborator
There was a problem hiding this comment.
I'd prefer to tweak the message at creation time (like is done in testcheck.py), rather than depending on catching it and mucking around with the internals.
Instead of intercepting and altering the exception messages, the step number is now inserted into the message when it is initially constructed.
msullivan
approved these changes
Dec 21, 2018
hauntsaninja
pushed a commit
that referenced
this pull request
Jan 6, 2023
#6076 made report generation disable cache but we didn't document it.
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.
I had to add a bit of functionality to the test runner, so command line tests can do multiple runs. That is in the first commit. The second commit contains the actual fix.