Introduce a PythonEval task.

Review Request #1772 - Created Feb. 15, 2015 and submitted

Information
John Sirois
pants
jsirois/python/compile
1106
1725, 1773
0cfbb6c...
Reviewers
pants-reviews
benjyw, nhoward_tw, stuhood, zundel
This task can be used to smoke out broken python code at "compile" time.
In particular, invalid imports (missing BUILD deps), top-level syntax
errors and top-level checks can be detected.

 src/python/pants/backend/python/tasks/BUILD                                  |  15 +++-
 src/python/pants/backend/python/tasks/python_eval.py                         | 149 ++++++++++++++++++++++++++++++++
 src/python/pants/backend/python/tasks/templates/python_eval/eval.py.mustache |  44 ++++++++++
 tests/python/pants_test/backend/python/BUILD                                 |   1 +
 tests/python/pants_test/backend/python/tasks/BUILD                           |  21 +++++
 tests/python/pants_test/backend/python/tasks/__init__.py                     |   0
 tests/python/pants_test/backend/python/tasks/test_python_eval.py             | 234 ++++++++++++++++++++++++++++++++++++++++++++++++++
 tests/python/pants_test/tasks/BUILD                                          |   1 +
 tests/python/pants_test/tasks/test_base.py                                   |   8 ++
 9 files changed, 470 insertions(+), 3 deletions(-)
CI went green here:
  https://travis-ci.org/pantsbuild/pants/builds/50805808

Issues

  • 0
  • 1
  • 0
  • 1
Description From Last Updated
John Sirois
John Sirois
John Sirois
Benjy Weinberger
John Sirois
John Sirois
John Sirois
Review request changed

Status: Closed (submitted)

Benjy Weinberger

Which reminds me - let's make sure that the new product engine has a robust story around testing...

Loading...