matplotlib/matplotlib — pull request #2486 by megies (2013-10-02 10:34:37+00:00)
Title: make pep8 test routine reusable for other projects

I'd like to reuse the pep8 testing routine from matplotlib in one of our projects (since it's a dependency anyway) rather than duplicate code (and maintenance) by copy/patching it into our codebase. This is the minimal changes necessary for reusability.

Nothing changes for matplotlib test case but the routine can now be imported and used from another project.
Also, it's better readable I think, to have all the custom exclusions grouped at the head of the file.
I also had to move the currently active manual skip to the bottom.

Furthermore, in principle I think the whole logic rather belongs into `/testing/..` and should only be imported and called in `/tests/..`, but I did not want to change this without a go-ahead (and its not that important, I guess).

Also, I will include a check if failing files are untracked to exclude them from the results by using a system call to `git` (try/excepted if `git` is available of course). If this PR gets a nod, I would offer to implement this right here, otherwise I'll do that in our test setup.