Fixed PEP8 coding style violations

`pep8 tests.py --ignore=E501` tells us everything is ok.

As part of http://24pullrequests.com, and to test if I can actually
submit a PR for matplotlib.
Merge pull request #3923 from habi/pep8ify

Fixed PEP8 coding style violations