Skip to content
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

Ignore cache when producing reports #6076

Merged
merged 3 commits into from
Dec 21, 2018

Conversation

mthuurne
Copy link
Contributor

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.

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
Copy link
Collaborator

@msullivan msullivan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 msullivan merged commit bb0017d into python:master Dec 21, 2018
@mthuurne mthuurne deleted the coverage_ignore_cache branch December 21, 2018 00:50
hauntsaninja pushed a commit that referenced this pull request Jan 6, 2023
#6076 made report generation disable cache but we didn't document it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants