def test_invalid_location_download_noconnect():
 from ..data import download_file
 with pytest.raises(IOError):
  download_file(u'http://astropy.org/nonexistentfile')

def test_invalid_location_download_noconnect ( ) : from . . data import download_file with pytest . raises ( IOError ) : download_file ( u'http://astropy.org/nonexistentfile' )
checks that download_file gives an ioerror if the socket is blocked .