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

Run each PEP561 test in its virtualenv dir #5225

Merged
merged 2 commits into from Jun 17, 2018

Conversation

Projects
None yet
3 participants
@ethanhs
Copy link
Collaborator

ethanhs commented Jun 16, 2018

When working on partial stub packages I realized that the changes in #5060 were flaking. This change runs mypy in each temporary directory, which avoids parrallelism/cache issues (sometimes the multiple processes would try to read/write the same cache file). To test this thoroughly, I ran the test 25 times in a row, with no failures.

if python_executable != sys.executable:
cmd_line.append('--python-executable={}'.format(python_executable))
out, err, returncode = mypy.api.run(cmd_line)
assert out == expected_out, err
assert err == expected_err, out
assert returncode == expected_returncode, returncode
if venv_dir is not None:

This comment has been minimized.

@JelleZijlstra

JelleZijlstra Jun 16, 2018

Collaborator

Put this in a finally block.

@ilevkivskyi ilevkivskyi merged commit 4389341 into python:master Jun 17, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@ethanhs ethanhs deleted the ethanhs:seppep561tests branch Jan 31, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.