diff --git a/astroquery/heasarc/core.py b/astroquery/heasarc/core.py index e5cabd9d33..aeed1d068b 100644 --- a/astroquery/heasarc/core.py +++ b/astroquery/heasarc/core.py @@ -169,9 +169,11 @@ def query_region_async(self, position: Union[coordinates.SkyCoord, str], kwargs['equinox'] = 2000 # Generate the request + # Fixed string representation of coordinates ensures that request payload + # does not depend on python/astropy version for the same input coordinates request_payload = self._args_to_payload( mission=mission, - entry="{},{}".format(c.ra.degree, c.dec.degree), + entry=f"{c.ra.degree:.10f},{c.dec.degree:.10f}", radius=u.Quantity(radius), **kwargs ) diff --git a/astroquery/heasarc/tests/data/0f36aba7.dat b/astroquery/heasarc/tests/data/10f92917.dat similarity index 100% rename from astroquery/heasarc/tests/data/0f36aba7.dat rename to astroquery/heasarc/tests/data/10f92917.dat diff --git a/astroquery/heasarc/tests/data/69b39684.dat b/astroquery/heasarc/tests/data/6ad7a587.dat similarity index 100% rename from astroquery/heasarc/tests/data/69b39684.dat rename to astroquery/heasarc/tests/data/6ad7a587.dat diff --git a/astroquery/heasarc/tests/data/31b1e555.dat b/astroquery/heasarc/tests/data/6df5af53.dat similarity index 100% rename from astroquery/heasarc/tests/data/31b1e555.dat rename to astroquery/heasarc/tests/data/6df5af53.dat diff --git a/astroquery/heasarc/tests/data/29872e7f.dat b/astroquery/heasarc/tests/data/eb62ea7d.dat similarity index 100% rename from astroquery/heasarc/tests/data/29872e7f.dat rename to astroquery/heasarc/tests/data/eb62ea7d.dat diff --git a/astroquery/heasarc/tests/data/26550aeb.dat b/astroquery/heasarc/tests/data/f3778475.dat similarity index 100% rename from astroquery/heasarc/tests/data/26550aeb.dat rename to astroquery/heasarc/tests/data/f3778475.dat diff --git a/astroquery/heasarc/tests/parametrization.py b/astroquery/heasarc/tests/parametrization.py index e40de7655c..8cac67559b 100644 --- a/astroquery/heasarc/tests/parametrization.py +++ b/astroquery/heasarc/tests/parametrization.py @@ -1,3 +1,4 @@ +import json import os import glob import hashlib @@ -40,7 +41,11 @@ def fileid_for_request(url, params): def filename_for_request(url, params, output=False): fileid = fileid_for_request(url, params) - return data_path(fileid, output=output) + + filename = data_path(fileid, output=output) + log.debug(f'constructed filename {filename} for request: ' + json.dumps(dict(url=url, params=params), sort_keys=True, indent=4)) + + return filename def get_mockreturn(session, method, url, params=None, timeout=10, **kwargs): diff --git a/astroquery/heasarc/tests/test_heasarc_remote.py b/astroquery/heasarc/tests/test_heasarc_remote.py index e6f7455762..50693e1d63 100644 --- a/astroquery/heasarc/tests/test_heasarc_remote.py +++ b/astroquery/heasarc/tests/test_heasarc_remote.py @@ -24,6 +24,7 @@ def test_custom_args(self): time="2020-09-01 .. 2020-12-01", resultmax=10, good_isgri=">1000", + cache=False ) def test_filter_custom_args(self): diff --git a/astroquery/heasarc/tests/test_heasarc_remote_isdc.py b/astroquery/heasarc/tests/test_heasarc_remote_isdc.py index c43cac094a..0f3765ec49 100644 --- a/astroquery/heasarc/tests/test_heasarc_remote_isdc.py +++ b/astroquery/heasarc/tests/test_heasarc_remote_isdc.py @@ -32,6 +32,7 @@ def test_custom_args(self): time="2020-09-01 .. 2020-12-01", resultmax=10, good_isgri=">1000", + cache=False ) def test_filter_custom_args(self):