Optional testing on query since 0.4dev version of astropy may not be available