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

Add testing for improved error message from #7628 when no valid interpreter can be resolved #7630

Merged

Conversation

Projects
None yet
3 participants
@Eric-Arellano
Copy link
Contributor

commented Apr 27, 2019

While we currently do check that the branch for no valid interpreter being detected works, the check is not very comprehensive.

In #7628, we made the logged error message even more complex, so it becomes even more important to check that we are logging the error message correctly.

@Eric-Arellano Eric-Arellano requested review from stuhood and cosmicexplorer Apr 27, 2019

@Eric-Arellano
Copy link
Contributor Author

left a comment

I can't get the test passing locally, because the Pants run succeeds. This happened before this PR too.

So we'll see how CI runs on this.

@@ -30,6 +30,40 @@ def hermetic(cls):
# in the below tests.
return True

def _build_pex(self, binary_target, config=None, args=None, version=PY_27):

This comment has been minimized.

Copy link
@Eric-Arellano

Eric-Arellano Apr 27, 2019

Author Contributor

Simply moved the below 3 functions up so that they appear near the top of the class, in line with where we usually place util code in test classes.

@@ -30,6 +30,40 @@ def hermetic(cls):
# in the below tests.
return True

def _build_pex(self, binary_target, config=None, args=None, version=PY_27):
# By default, Avoid some known-to-choke-on interpreters.
constraint = '["CPython>=3.6,<4"]' if version == PY_3 else '["CPython>=2.7,<3"]'

This comment has been minimized.

Copy link
@Eric-Arellano

Eric-Arellano Apr 27, 2019

Author Contributor

This is the only change made to these 3 functions. Using a ternary expression to better express intent and have less lines.

Show resolved Hide resolved tests/python/pants_test/backend/python/test_interpreter_cache.py
@stuhood
Copy link
Member

left a comment

Thanks!

@Eric-Arellano Eric-Arellano merged commit 099894f into pantsbuild:master Apr 29, 2019

1 check passed

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

@Eric-Arellano Eric-Arellano deleted the Eric-Arellano:test-constraints-failed branch Apr 29, 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.