Deprecate PytestRun env vars.

Review Request #2299 - Created May 31, 2015 and submitted

Information
John Sirois
pants
jsirois/pytest_run/deprecate_envs
1618
c9e8876...
Reviewers
pants-reviews
benjyw, chrischen, mateor, zundel

This adds standard @deprecated support for any access to env vars in
place of the equivalent options via a class decorator that generates a
pair of methods for each env/replacement-option pair.

Along the way it fixes a bug where --coverage was being exported but
not honored.

src/python/pants/backend/python/tasks/BUILD | 1 +
src/python/pants/backend/python/tasks/pytest_run.py | 71 +++++++++++++++----
tests/python/pants_test/backend/python/tasks/test_pytest_run.py | 191 +++++++++++++++++++++++++++++++-------------------
3 files changed, 178 insertions(+), 85 deletions(-)

Manually tested that advancing the version to 0.0.35 triggered
the expected error when running:

$ PANTS_DEV=1 ./pants compile compile src/python/pants/backend/python/tasks/:python

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

John Sirois
Mateo Rodriguez
Eric Ayers
John Sirois
John Sirois
Eric Ayers
Mateo Rodriguez
John Sirois
John Sirois
Review request changed

Status: Closed (submitted)

Loading...