Fold PythonTestBuilder into the PytestRun task.

Review Request #1993 — Created March 26, 2015 and submitted

jsirois, patricklaw
PythonTestBuilder was a vestige of the old, pre-task Pants. The PytestRun
task was implemented as a thin wrapper around it.  This change merges
the functionality into PytestRun and gets rid of PythonTestBuilder as
a standalone class.

- Fixes various kludges, such as logging:  Now code that was formerly
  in PythonTestBuilder has access to the task's logging facilities, so
  it can use those instead of print().
- PythonTestBuilder's test is now a task test for PytestRun. It uses
  the new TaskTestBase, and demonstrates how this base class could
  be used instead of the old PythonTaskTest in the remaining tests
  that still use the latter.

CI passed:

  2. 3rdparty/python:pex and src/python/pants/backend/python:python_setup are unused now.

    1. I believe they are still needed: pex is used in several files in that glob, and uses python_setup.

  3. I 1st read 'level' as a typo, maybe 'not_debug' to make it more clear what's going on here.
    1. I think that actually was a typo. I probably intended it to be 'info'... However it turns out (as you'd expect) that none of this matters, since the tests pass with level set to anything, and that passthru of 'debug' was probably just there from when the test author was debugging it. So I just hardwired level=info, as it's confusing to the reader to see a test care about logging levels.

    2. When debugging a test we can manually switch that to 'debug' for the duration of the fix effort.

  1. Ooops! Early morning doziness made me forget the cardinal rule of RB - never update a review after rebasing... Will close and patch manually.

Review request changed

Status: Closed (submitted)

Change Summary:

Submitted as bbe4861ab6cace2f54002c37d8773732a72a77bd.