PEP8 fixes in astropy/tests

Goes towards fixing #1133.