File tree Expand file tree Collapse file tree 3 files changed +15
-2
lines changed
astroquery/utils/tap/model Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,10 @@ Infrastructure, Utility and Other Changes and Additions
42
42
- Callback hooks are deleted before caching. Potentially all cached queries
43
43
prior to this PR will be rendered invalid. [#2295]
44
44
45
+ - The modules that make use of the ``astroquery.utils.tap.model.job.Job `` class
46
+ (e.g. Gaia) no longer print messages about where the results of async queries
47
+ were written if the ``verbose `` setting is ``False ``. [#2299]
48
+
45
49
46
50
0.4.5 (2021-12-24)
47
51
==================
Original file line number Diff line number Diff line change @@ -299,7 +299,8 @@ def save_results(self, verbose=False):
299
299
output = self .outputFile
300
300
else :
301
301
output = self .outputFileUser
302
- print (f"Saving results to: { output } " )
302
+ if verbose :
303
+ print (f"Saving results to: { output } " )
303
304
self .connHandler .dump_to_file (output , response )
304
305
305
306
def wait_for_job_end (self , verbose = False ):
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ def test_job_basic():
35
35
job .get_results ()
36
36
37
37
38
- def test_job_get_results ():
38
+ def test_job_get_results (capsys , tmpdir ):
39
39
job = Job (async_job = True )
40
40
jobid = "12345"
41
41
outputFormat = "votable"
@@ -82,6 +82,14 @@ def test_job_get_results():
82
82
if cn not in res .colnames :
83
83
pytest .fail (f"{ cn } column name not found: { res .colnames } " )
84
84
85
+ # Regression test for #2299; messages were printed even with `verbose=False`
86
+ capsys .readouterr ()
87
+ job ._Job__resultInMemory = False
88
+ job .save_results (verbose = False )
89
+ assert 'Saving results to:' not in capsys .readouterr ().out
90
+ job .save_results (verbose = True )
91
+ assert 'Saving results to:' in capsys .readouterr ().out
92
+
85
93
86
94
def test_job_phase ():
87
95
job = Job (async_job = True )
You can’t perform that action at this time.
0 commit comments