Convert validation.assert_list isinstance checking to be lazy

Review Request #2228 - Created May 15, 2015 and submitted

Information
Simeon Franklin
pants
1550
aac52eb...
Reviewers
pants-reviews
dturner-tw, jsirois, kwlzn, nhoward_tw

Single line alteration - pants.base.validation.assert_list is called frequently and I added laziness to avoid unneccesary function calls. Saw this when profiling and wanted to fix it despite it not being a huge win...

I also added unit tests for this function which doesn't appear to be directly unit before this.

Pull request https://github.com/pantsbuild/pants/pull/1550 runs the Travis CI suite and it all passes.

I can't seem to run the ci script myself but I did run all the unit tests which pass and verified that the new test_validation target was included in the tests that run. One of the tests demonstrates the lazyness of the new version.

Mateo Rodriguez
Eric Ayers
John Sirois
Simeon Franklin
David Turner
John Sirois
John Sirois
Simeon Franklin
Review request changed

Status: Closed (submitted)

Change Summary:

In master @ https://github.com/pantsbuild/pants/commit/a366cf2cb3afce2f8560a596e3dc199ee2ed5320

Loading...