-
-
Notifications
You must be signed in to change notification settings - Fork 636
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
fix/integration test for pants_requirement() #5457
fix/integration test for pants_requirement() #5457
Conversation
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.
Thanks!
@@ -0,0 +1,15 @@ | |||
# coding=utf-8 | |||
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). |
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.
2018
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.
This has now been fixed.
@@ -0,0 +1 @@ | |||
pants_requirement() |
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.
Should this... have an argument?
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.
Not necessarily, and not needed for this purpose. See test_pants_requirement.py
for an example of providing a name and not.
from pants_test.base_test import BaseTest | ||
|
||
|
||
class PantsPluginPantsRequirementTest(BaseTest): |
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.
It's not clear that this is testing what it is testing... maybe an integration test that runs some pants command on the target?
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.
Thanks for pointing this out, this was completely removed.
'tests/python/pants_test:test_infra', | ||
'testprojects/pants-plugins/3rdparty/pants', | ||
], | ||
tags={'integration'}, |
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.
This isn't currently an integration test, but maybe it should be? See below.
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.
Thanks for pointing this out here too -- this was removed as well.
Travis is failing, and I need to review |
Hm, yea: if you need a broken BUILD file you'd need to rename it temporarily inside the test. See
|
he never leaves a single ring that's why gryffindors all sing stu hood is our king
Thanks! |
It looks like this test is going to fail during between "bumping the version" and actually releasing the new bumped version. I'm seeing it fail #5513 for that reason (which bumps the version to Can you adjust the test to use a stable version of pants? |
Landing with red CI due to #5457.
Problem
It's not possible to use
pants_requirement()
to stand in forpython_requirement_library(requirements=[python_requirement('pantsbuild.pants==1.5.0.dev3')])
in a separate repo. This defeats the purpose ofpants_requirement()
, which expands into an==
requirement on the pants version denoted in the repo'spants.ini
. The error is:Solution
ParseContext#create_object()
accepts an alias as the first argument, not the class itself. ChangingPythonRequirementLibrary
to'python_requirement_library'
insrc/python/pants/backend/python/pants_requirement.py
allowspants_requirement()
to be used as documented. Integration tests were added intests/python/pants_test/backend/python{test_pants_requirement_integration,/tasks/test_setup_py_integration}.py
.