Conversation
JukkaL
approved these changes
Aug 27, 2019
Collaborator
JukkaL
left a comment
There was a problem hiding this comment.
Thanks for improving our developer experience! Looks good, just a few minor comments.
mypyc/test/test_run.py
Outdated
| if e.args == ("interrupted",): | ||
| raise KeyboardInterrupt | ||
|
|
||
| return False |
Collaborator
There was a problem hiding this comment.
What if the exit code is 0? Should we return True in that case?
| We had to fork it because the real run_setup swallows errors | ||
| and KeyboardInterrupt with no way to recover them (!). | ||
| The real version has some extra features that we removed since | ||
| we weren't using them. |
Collaborator
There was a problem hiding this comment.
Document the return value.
Currently we use distutil's `run_setup` function to wrap the invocation of `setup.py` in test_run, which speeds things up a little bit. Unfortunately `run_setup` swallows KeyboardInterrupt (and all other failures), which prevents ctrl-c from terminating tests (the tests will fail instead with -n0; with parallel testing, pytest will die but it will take several seconds, I think while it waits for tests to finish.) Make a clone of run_setup that doesn't have these problems.
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.
Currently we use distutil's
run_setupfunction to wrap theinvocation of
setup.pyin test_run, which speeds things up a littlebit. Unfortunately
run_setupswallows KeyboardInterrupt (and allother failures), which prevents ctrl-c from terminating tests (the
tests will fail instead with -n0; with parallel testing, pytest will
die but it will take several seconds, I think while it waits for tests
to finish.)
Make a clone of run_setup that doesn't have these problems.