Edit Config.get_required so as to raise error for any blank options.
Review Request #1638 - Created Jan. 22, 2015 and submitted
|benjyw, jsirois, zundel|
As it stood, get_required would not raise a ConfigError for strings
(the default) if the option was left blank, unlike other data types.
A str option that was left blank was parsed as '' and any error
catching was left to the tooling. This adds an explicit check for
times where get_required() could return an empty string instead of the
If a blank option is a viable choice, I think get(...default="") is
a better choice for those situations. I added a set of get_required
tests as well.
PANTS_DEV=1 ./pants test tests/python/pants_test:all : Success
Travis Passed: https://travis-ci.org/pantsbuild/pants/builds/47998589
Thanks Benjy. I would be sad to see get_required go, I am using this patch pretty heavily in my upcoming review.
Unrelatedly, I guess I need to check out the coveralls spec. I added tests for an untested function and the coverage went down!
Revision 2 (+14 -1)