There are many unit tests in webkitpy containing the following two lines at the bottom: if __name__=='__main__': unittest.main() Some unit test files are even executable and/or containing the shebang line at the top of the file. I guess there was once a tendency to be able to run only specific unit tests. Given that today the tests, when running test-webkitpy, are run in parallel and can be narrowed down via the command line, is there still a requirement for that?
As you say, I originally ran many of the unit tests individually to test modules; partially this was because of python convention, and partially this was because test-webkitpy was pretty bare-bones and missing a bunch of stuff I needed (like being able to get coverage numbers). I've added all of the features to test-webkitpy since then, and rarely run the tests directly now, so there's no real reason to keep these lines. (The other people who did python development, like eseidel and abarth, pretty much never used these lines in the first place, so I don't think anyone will object to removing them across the board).
Nope. :) Go for it.
Created attachment 177438 [details] Patch
(In reply to comment #3) > Created an attachment (id=177438) [details] > Patch This patch only covers unit tests, but there are other files as well that contain shebang lines and are executable. I'll spin up another patch for those.
Comment on attachment 177438 [details] Patch LGTM. But you probably want to wait for Dirk to confirm.
Comment on attachment 177438 [details] Patch looks fine.
Comment on attachment 177438 [details] Patch Clearing flags on attachment: 177438 Committed r136548: <http://trac.webkit.org/changeset/136548>
All reviewed patches have been landed. Closing bug.