Make SourceRoot fundamentally understand a rel_path.

Review Request #1036 - Created Sept. 15, 2014 and submitted

Information
John Sirois
pants
jsirois/source_root/fundamental
575
f9fea4a...
Reviewers
pants-reviews
patricklaw, zundel

Add a factory for constructing a SourceRoot from a ParseContext
as a secondary means of creation and wire this up to core's
regiaster.py. Simplify a test as a result.

src/python/pants/backend/core/register.py | 2 +-
src/python/pants/base/source_root.py | 10 ++++++++--
tests/python/pants_test/base/test_source_root.py | 6 +-----
3 files changed, 10 insertions(+), 8 deletions(-)

$ pants.dev goal test tests/python/pants_test/base:source_root
...
15:17:25 00:01   [test]
15:17:25 00:01     [pytest]
15:17:25 00:01       [run]
                     ============== test session starts ===============
                     platform linux2 -- Python 2.6.9 -- py-1.4.24 -- pytest-2.6.2
                     plugins: cov, timeout
                     collected 9 items 

                     tests/python/pants_test/base/test_source_root.py .........

                     ====== 9 passed, 1 warnings in 0.05 seconds ======

15:17:25 00:01     [junit]
15:17:25 00:01     [specs]
               SUCCESS

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

John Sirois
John Sirois
Eric Ayers
John Sirois
Review request changed

Status: Closed (submitted)

Patrick Lawson

Ship It!

Loading...