TST: Fix cosmology test warnings
TST: Fix cosmology test warnings

larrybradley/astropy,aleksandr-bakanov/astropy,MSeifert04/astropy,mhvk/astropy,mhvk/astropy,pllim/astropy,aleksandr-bakanov/astropy,bsipocz/astropy,saimn/astropy,mhvk/astropy,StuartLittlefair/astropy,lpsinger/astropy,pllim/astropy,saimn/astropy,stargaser/astropy,StuartLittlefair/astropy,StuartLittlefair/astropy,stargaser/astropy,lpsinger/astropy,lpsinger/astropy,stargaser/astropy,lpsinger/astropy,StuartLittlefair/astropy,astropy/astropy,bsipocz/astropy,saimn/astropy,pllim/astropy,saimn/astropy,pllim/astropy,mhvk/astropy,dhomeier/astropy,astropy/astropy,dhomeier/astropy,astropy/astropy,MSeifert04/astropy,astropy/astropy,MSeifert04/astropy,dhomeier/astropy,aleksandr-bakanov/astropy,pllim/astropy,saimn/astropy,astropy/astropy,aleksandr-bakanov/astropy,lpsinger/astropy,bsipocz/astropy,larrybradley/astropy,StuartLittlefair/astropy,larrybradley/astropy,larrybradley/astropy,mhvk/astropy,dhomeier/astropy,bsipocz/astropy,larrybradley/astropy,dhomeier/astropy,stargaser/astropy,MSeifert04/astropy