-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
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
e5bbe4d
to
2844779
Compare
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.
One requested change about how to make the changes to the test framework.
Otherwise looks great!
mypy/test/testcmdline.py
Outdated
for step in [1] + sorted(testcase.output2): | ||
try: | ||
test_python_cmdline(testcase, step) | ||
except AssertionError as ex: |
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'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.
#6076 made report generation disable cache but we didn't document it.
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.