Skip to content

Commit

Permalink
remove unneeded dependency test
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Livingston committed Jan 30, 2018
1 parent 2925530 commit c6edc08
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 49 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,38 +21,3 @@ python_binary(
':superhello',
]
)

# The targets below are for testing purposes only.
# Their purpose is to expose an error that arises when a python_dist
# contains a requirement that conflicts with the same requirement of
# a different version in the consuming target. In this case, the pants
# goal will fail and indicate that incomptible requirements exist.

python_dist(
name='superhello_with_conflicting_dep',
sources=[
'super_greet.c',
'hello_package/hello.py',
'hello_package/__init__.py',
'setup.py'
],
dependencies=[
':pex_lib'
]
)

python_binary(
name='main_with_conflicting_dep',
source='main.py',
dependencies=[
':superhello_with_conflicting_dep',
'3rdparty/python:pex'
]
)

python_requirement_library(
name='pex_lib',
requirements=[
python_requirement('pex==1.2.11'),
]
)
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,3 @@ def test_pants_test(self):
command=['test', '{}:superhello'.format(self.superhello_tests)]
pants_run = self.run_pants(command=command)
self.assert_success(pants_run)

def test_with_conflicting_deps(self):
command=['run', '{}:main_with_conflicting_dep'.format(self.superhello_project)]
pants_run = self.run_pants(command=command)
self.assert_failure(pants_run)
self.assertIn('Exception message: Could not satisfy all requirements', pants_run.stderr_data)
command=['binary', '{}:main_with_conflicting_dep'.format(self.superhello_project)]
pants_run = self.run_pants(command=command)
self.assert_failure(pants_run)
self.assertIn('Exception message: Could not satisfy all requirements', pants_run.stderr_data)
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,7 @@ def targets(self):
'testprojects/tests/java/org/pantsbuild/testproject/depman:new-tests',
'testprojects/tests/java/org/pantsbuild/testproject/depman:old-tests',
'testprojects/tests/java/org/pantsbuild/testproject/htmlreport:htmlreport',
'testprojects/tests/java/org/pantsbuild/testproject/parallel.*',
'testprojects/src/python/python_distribution/superhello_with_install_requires:main_no_conflict',
'testprojects/src/python/python_distribution/superhello_with_install_requires:main_with_conflicting_dep',
'examples/src/python/example/python_distribution/hello/superhello:main_with_conflicting_dep'
'testprojects/tests/java/org/pantsbuild/testproject/parallel.*'
]

# May not succeed without java8 installed
Expand Down

0 comments on commit c6edc08

Please sign in to comment.