Hack around a few Distribution issues in py tests.

Review Request #2692 - Created Aug. 24, 2015 and submitted

Information
John Sirois
pants
jsirois/python_antlr_builder/hack_around_distribution_subsystem_dep_in_tests
2005, 2054, 2055
2657
8b67cd8...
Reviewers
pants-reviews
benjyw, gmalmquist, zundel
Distribution gained an undeclared direct dependency on the JVM
subsystem, fouling python tests exercising the antlr builder when run
in isolation.  This change hacks in the deps - which point out that the
JVM Subsystem needs to move out of the jvm backend - and props up a JVM
Subsystem by hand in the 2 affected tests.

 tests/python/pants_test/backend/python/BUILD                  |  5 +++++
 tests/python/pants_test/backend/python/tasks/BUILD            |  6 ++++++
 tests/python/pants_test/backend/python/tasks/test_setup_py.py | 23 +++++++++++++----------
 tests/python/pants_test/backend/python/test_python_chroot.py  | 31 ++++++++++++++++++++-----------
 4 files changed, 44 insertions(+), 21 deletions(-)

Before tests/python/pants_test/backend/python:python_chroot and
tests/python/pants_test/backend/python/tasks:setup_py failed with:

...
src/python/pants/backend/jvm/subsystems/jvm.py:54: in _normalized_jdk_paths
   jdk_paths = self.get_options().jdk_paths or {}
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pants_test.option.util.fakes._FakeOptionValues object at 0x7f1af32f54d0>
key = 'jdk_paths'

   def __getattr__(self, key):
>     value = self._option_values[key]
E     KeyError: 'jdk_paths'
...

Those both now test green individually.

CI went green here:
https://travis-ci.org/pantsbuild/pants/builds/77042772

John Sirois
Benjy Weinberger
Eric Ayers
John Sirois
John Sirois
John Sirois
Review request changed

Status: Closed (submitted)

Loading...