Skip to content

Commit 8737c90

Browse files
committed
Uniformizing testcleanup, using the new utils function
1 parent fccaf14 commit 8737c90

File tree

4 files changed

+25
-9
lines changed

4 files changed

+25
-9
lines changed

docs/cadc/cadc.rst

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -490,14 +490,6 @@ More details about temporary table upload can be found in the IVOA TAP specifica
490490
tess2021167190903-s0039-1-3-0210-s science
491491
tu1657207 science
492492

493-
494-
.. testcleanup::
495-
496-
>>> import os
497-
>>> if os.path.isfile('my_observations.xml'):
498-
... os.remove('my_observations.xml')
499-
500-
501493
The feature allows a user to save the results of a query to use them later or
502494
correlate them with data in other TAP services.
503495

@@ -665,3 +657,9 @@ Reference/API
665657

666658
.. automodapi:: astroquery.cadc
667659
:no-inheritance-diagram:
660+
661+
662+
.. testcleanup::
663+
664+
>>> from astroquery.utils.cleanup_downloads import cleanup_saved_downloads
665+
>>> cleanup_saved_downloads(['my_observations.xml', 'test_output_noauth.xml'])

docs/esa/hsa/hsa.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,3 +238,9 @@ Reference/API
238238

239239
.. automodapi:: astroquery.esa.hsa
240240
:no-inheritance-diagram:
241+
242+
243+
.. testcleanup::
244+
245+
>>> from astroquery.utils.cleanup_downloads import cleanup_saved_downloads
246+
>>> cleanup_saved_downloads(['1342195355*', 'results.csv'])

docs/ipac/irsa/sha/sha.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,3 +100,8 @@ Reference/API
100100
:no-inheritance-diagram:
101101

102102
.. _API: http://sha.ipac.caltech.edu/applications/Spitzer/SHA/help/doc/api.html
103+
104+
.. testcleanup::
105+
106+
>>> from astroquery.utils.cleanup_downloads import cleanup_saved_downloads
107+
>>> cleanup_saved_downloads(['sha_tmp'])

docs/mast/mast.rst

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ with a `~astropy.table.Table` of data products, or a list (or single) obsid as t
304304

305305
>>> from astroquery.mast import Observations
306306
...
307-
>>> single_obs = Observations.query_criteria(obs_collection="IUE",obs_id="lwp13058")
307+
>>> single_obs = Observations.query_criteria(obs_collection="IUE", obs_id="lwp13058")
308308
>>> data_products = Observations.get_product_list(single_obs)
309309
...
310310
>>> manifest = Observations.download_products(data_products, productType="SCIENCE")
@@ -1259,3 +1259,10 @@ Reference/API
12591259
.. automodapi:: astroquery.mast
12601260
:no-inheritance-diagram:
12611261
:inherited-members:
1262+
1263+
1264+
.. testcleanup::
1265+
1266+
>>> from astroquery.utils.cleanup_downloads import cleanup_saved_downloads
1267+
>>> cleanup_saved_downloads(['mastDownload*', 'tess-*', 'lwp13058*', '3dhst*'])
1268+

0 commit comments

Comments
 (0)