Skip to content

Commit 4b109a7

Browse files
committed
TST: fixing failing doctests
1 parent 6dceccc commit 4b109a7

File tree

10 files changed

+30
-29
lines changed

10 files changed

+30
-29
lines changed

astroquery/lamda/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def get_molecules(self, *, cache=True):
122122
response = self._request('GET', main_url, cache=cache)
123123
response.raise_for_status()
124124

125-
soup = BeautifulSoup(response.content)
125+
soup = BeautifulSoup(response.content, features="html5lib")
126126

127127
links = soup.find_all('a', href=True)
128128
datfile_urls = [url

docs/casda/casda.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ For example:
2525
>>> from astropy import units as u
2626
>>> centre = SkyCoord.from_name('NGC 7232')
2727
>>> result_table = Casda.query_region(centre, radius=30*u.arcmin)
28-
>>> print(result_table['obs_publisher_did','s_ra', 's_dec', 'obs_release_date'][:5])
28+
>>> print(result_table['obs_publisher_did','s_ra', 's_dec', 'obs_release_date'][:5]) # doctest: +IGNORE_OUTPUT
2929
obs_publisher_did s_ra s_dec obs_release_date
3030
deg deg
3131
----------------- --------------- ---------------- ------------------------
@@ -45,7 +45,7 @@ For example to filter out the 30 non-public results from the above data set:
4545
.. doctest-remote-data::
4646

4747
>>> public_results = Casda.filter_out_unreleased(result_table)
48-
>>> print(public_results['obs_publisher_did','s_ra', 's_dec', 'obs_release_date'][:5])
48+
>>> print(public_results['obs_publisher_did','s_ra', 's_dec', 'obs_release_date'][:5]) # doctest: +IGNORE_OUTPUT
4949
obs_publisher_did s_ra s_dec obs_release_date
5050
deg deg
5151
----------------- --------------- ---------------- ------------------------

docs/esa/jwst/jwst.rst

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
.. _astroquery.esa.jwst:
32

43
****************************************
@@ -379,14 +378,14 @@ Once a table is loaded, columns can be inspected
379378
>>> from astroquery.esa.jwst import Jwst
380379
>>> table = Jwst.load_table('jwst.main')
381380
>>> print(*(column.name for column in table.columns), sep="\n")
382-
"public"
383-
algorithm_name
384-
calibrationlevel
385-
collection
386-
creatorid
387-
dataproducttype
388-
energy_bandpassname
389-
...
381+
public
382+
algorithm_name
383+
calibrationlevel
384+
collection
385+
creatorid
386+
dataproducttype
387+
energy_bandpassname
388+
...
390389
391390
392391
1.6 Synchronous query

docs/ipac/irsa/irsa.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ entered as a string that is parsable by `~astropy.coordinates.Angle`.
6868
>>> import astropy.units as u
6969
>>> table = Irsa.query_region("m31", catalog="fp_psc", spatial="Cone",
7070
... radius=2 * u.arcmin)
71-
>>> print(table)
71+
>>> print(table) # doctest: +IGNORE_OUTPUT
7272
ra dec clon clat ... angle j_h h_k j_k
7373
deg deg ... deg
7474
---------- ---------- ------------ ------------ ... ---------- ----- ----- -----

docs/ipac/irsa/most.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -363,16 +363,16 @@ asteroid `Victoria <https://en.wikipedia.org/wiki/12_Victoria>`_ as:
363363
ra_obj dec_obj sun_dist geo_dist ... moon_sep saa_sep qual_frame image_set
364364
float64 float64 float64 float64 ... float64 float64 int64 int64
365365
---------- --------- -------- -------- ... -------- ------- ---------- ---------
366-
333.539704 -0.779309 1.8179 1.4638 ... 102.339 15.039 10 6
367-
333.539704 -0.779309 1.8179 1.4638 ... 102.339 15.039 10 6
366+
333.539704 -0.779308 1.8179 1.4638 ... 102.339 15.039 10 6
367+
333.539704 -0.779308 1.8179 1.4638 ... 102.339 15.039 10 6
368368
333.589056 -0.747249 1.8179 1.4626 ... 103.825 46.517 10 6
369369
333.589056 -0.747249 1.8179 1.4626 ... 103.825 46.517 10 6
370370
333.638286 -0.71525 1.8179 1.4614 ... 105.327 89.053 10 6
371371
333.638286 -0.71525 1.8179 1.4614 ... 105.327 89.053 10 6
372372
333.687495 -0.683205 1.8178 1.4603 ... 106.803 115.076 10 6
373373
333.687495 -0.683205 1.8178 1.4603 ... 106.803 115.076 10 6
374-
333.736581 -0.651221 1.8178 1.4591 ... 108.294 73.321 10 6
375-
333.736581 -0.651221 1.8178 1.4591 ... 108.294 73.321 10 6
374+
333.736581 -0.65122 1.8178 1.4591 ... 108.294 73.321 10 6
375+
333.736581 -0.65122 1.8178 1.4591 ... 108.294 73.321 10 6
376376

377377
To return more than just a table of image identifiers, use one of the more
378378
verbose output modes - ``Regular`` or ``Full``.
@@ -393,16 +393,16 @@ verbose output modes - ``Regular`` or ``Full``.
393393
ra_obj dec_obj sun_dist geo_dist ... moon_sep saa_sep qual_frame image_set
394394
float64 float64 float64 float64 ... float64 float64 int64 int64
395395
---------- --------- -------- -------- ... -------- ------- ---------- ---------
396-
333.539704 -0.779309 1.8179 1.4638 ... 102.339 15.039 10 6
397-
333.539704 -0.779309 1.8179 1.4638 ... 102.339 15.039 10 6
396+
333.539704 -0.779308 1.8179 1.4638 ... 102.339 15.039 10 6
397+
333.539704 -0.779308 1.8179 1.4638 ... 102.339 15.039 10 6
398398
333.589056 -0.747249 1.8179 1.4626 ... 103.825 46.517 10 6
399399
333.589056 -0.747249 1.8179 1.4626 ... 103.825 46.517 10 6
400400
333.638286 -0.71525 1.8179 1.4614 ... 105.327 89.053 10 6
401401
333.638286 -0.71525 1.8179 1.4614 ... 105.327 89.053 10 6
402402
333.687495 -0.683205 1.8178 1.4603 ... 106.803 115.076 10 6
403403
333.687495 -0.683205 1.8178 1.4603 ... 106.803 115.076 10 6
404-
333.736581 -0.651221 1.8178 1.4591 ... 108.294 73.321 10 6
405-
333.736581 -0.651221 1.8178 1.4591 ... 108.294 73.321 10 6
404+
333.736581 -0.65122 1.8178 1.4591 ... 108.294 73.321 10 6
405+
333.736581 -0.65122 1.8178 1.4591 ... 108.294 73.321 10 6
406406

407407
As demonstrated, the returned values are stored in a dictionary and which
408408
``metadata`` key table matches the ``Brief`` output mode table.

docs/ipac/nexsci/nasa_exoplanet_archive.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ A list of accessible tables can be found in the ``TAP_TABLES`` attribute:
9393

9494
>>> from astroquery.ipac.nexsci.nasa_exoplanet_archive import NasaExoplanetArchive
9595
>>> NasaExoplanetArchive.TAP_TABLES
96-
['superwasptimeseries',
96+
['spectra',
97+
'superwasptimeseries',
9798
'kelttimeseries',
9899
'DI_STARS_EXEP',
99100
'transitspec',

docs/jplsbdb/jplsbdb.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ item:
156156
.. code-block:: python
157157
158158
>>> sbdb['orbit']['moid_jup'] # doctest: +REMOTE_DATA
159-
<Quantity 0.431 AU>
159+
<Quantity 0.43 AU>
160160
161161
Note that many of the items in the output dictionary are associated
162162
with `~astropy.units` which can be readily used for
@@ -167,7 +167,7 @@ orbit intersection distance of the target with respect to Jupiter
167167
.. code-block:: python
168168
169169
>>> print(sbdb['orbit']['moid_jup'].to('km')) # doctest: +REMOTE_DATA
170-
64476682.271699995 km
170+
64327084.40099999 km
171171
172172
The vast majority of parameter names are identical to those used in
173173
the `SBDB API documentation

docs/lamda/lamda.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ is called, then cached for future use. If there has been an update and you
2727
want to reload the cache, you can find the cache file ``'molecules.json'`` and
2828
remove it:
2929

30-
.. doctest-remote-data::
30+
.. doctest-skip::
3131

3232
>>> import os
33-
>>> Lamda.cache_location # doctest: +IGNORE_OUTPUT
33+
>>> Lamda.cache_location
3434
'/Users/your_username/.astropy/cache/astroquery/Lamda'
35-
>>> Lamda.moldict_path # doctest: +IGNORE_OUTPUT
35+
>>> Lamda.moldict_path
3636
'/Users/your_username/.astropy/cache/astroquery/Lamda/molecules.json'
3737
>>> os.remove(Lamda.moldict_path)
3838

docs/mpc/mpc.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ degrees per hour:
359359

360360
>>> eph = MPC.get_ephemeris('C/1996 B2', start='1996-03-01', step='1h', number=30 * 24)
361361
>>> print(eph['Proper motion'].quantity.to('deg/h').max())
362-
0.7756944444444445 deg / h
362+
0.17234444444444447 deg / h
363363

364364
Sky coordinates are returned as quantities carrying units of degrees.
365365
If a sexagesimal representation is desired, they may be replaced with

docs/svo_fps/svo_fps.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ range) can be listed with
2525
>>> from astroquery.svo_fps import SvoFps
2626
>>> index = SvoFps.get_filter_index(12_000*u.angstrom, 12_100*u.angstrom)
2727
>>> index.info
28-
<Table length=14>
28+
<Table length=15>
2929
name dtype unit
3030
-------------------- ------- ---------------
3131
FilterProfileService object
@@ -62,6 +62,7 @@ range) can be listed with
6262
AsinhSoft float64
6363
TrasmissionCurve object
6464

65+
6566
If the wavelength range contains too many entries then a ``TimeoutError`` will
6667
occur. A smaller wavelength range might succeed, but if a large range really is
6768
required then you can use the ``timeout`` argument to allow for a longer

0 commit comments

Comments
 (0)