Skip to content

Commit 01dc91c

Browse files
committed
Allow gaia tests to succeed with astropy 4.0
One of the effects of astropy/astropy@e9d13fc is that `"_votable_string_dtype"` key together with the corresponding value gets added to the metadata of columns read from a VOTable. That commit is included in `astropy` versions 4.1 and later, but is missing from 4.0. The fixture that generates data for column attribute comparison in `gaia` tests now takes the `astropy` version into account.
1 parent f180585 commit 01dc91c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

astroquery/gaia/tests/test_gaiatap.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
import astropy.units as u
3131
from astropy.coordinates.sky_coordinate import SkyCoord
3232
import numpy as np
33+
from astroquery.utils import ASTROPY_LT_4_1
3334
from astroquery.utils.tap.xmlparser import utils
3435
from astroquery.utils.tap.core import TapPlus, TAP_CLIENT_ID
3536
from astroquery.utils.tap import taputils
@@ -49,7 +50,8 @@ def column_attrs():
4950
"table1_oid": np.int32
5051
}
5152
columns = {k: Column(name=k, description=k, dtype=v) for k, v in dtypes.items()}
52-
columns["source_id"].meta = {"_votable_string_dtype": "char"}
53+
if not ASTROPY_LT_4_1:
54+
columns["source_id"].meta = {"_votable_string_dtype": "char"}
5355
return columns
5456

5557

0 commit comments

Comments
 (0)