Run mypy in runtest if complete run on all files was not done #68
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.
Resolve #72
Commit 11d6c23
from Author: David Tucker david@tucker.name @dmtucker
On 2019-06-16 21:05:55
Subject: Call mypy once and parse its output
The above commit makes it so that runtest() no longer runs any tests, instead the pytest_runtestloop is overwritten to allow to run mypy only once. When using pytest-mypy in conjunction with pytest-xdist, this leads to mypy not being invoked at all anymore: pytest-xdist overwrites the runtestloop, so pytest-mypy runtestloop is no longer executing. pytest-xdist does call runtest(), but since that does no longer run any tests mypy is not invoked (and even worse, it is claimed no error occured, since the state that mypy was never run is not recorded).
This MR is my crude attempt to fix the problem: runtest() needs to run mypy if the runtestloop did not execute. For my setup with xdist+mypy this now results in the mypy checks actually running again.
Let me know your thoughts :)