Cleaned tests file to correct all pyflakes and pep8 errors

FWIW in Emacs, I'd use M-q (Alt-q) to "reflow" this. Perhaps your editor, too, has a syntax-aware reflow.