@@ -362,7 +362,7 @@ def test_launch_job_async_json_format(tmp_path_factory, column_attrs_launch_json
362
362
assert results [colname ].dtype == attrs .dtype
363
363
364
364
365
- def test_launch_job_json_format (tmp_path_factory , column_attrs_launch_json , mock_querier_json , ):
365
+ def test_launch_job_json_format (tmp_path_factory , column_attrs_launch_json , mock_querier_json ):
366
366
d = tmp_path_factory .mktemp ("data" ) / 'launch_job.json'
367
367
d .write_text (JOB_DATA_QUERIER_ASYNC_JSON , encoding = "utf-8" )
368
368
@@ -389,6 +389,28 @@ def test_launch_job_json_format(tmp_path_factory, column_attrs_launch_json, mock
389
389
assert results [colname ].unit == attrs .unit
390
390
assert results [colname ].dtype == attrs .dtype
391
391
392
+ def test_launch_job_json_format_no_dump (tmp_path_factory , column_attrs_launch_json , mock_querier_json ):
393
+
394
+ dump_to_file = False
395
+ output_format = 'json'
396
+ query = "SELECT TOP 1 source_id, ra, dec, parallax from gaiadr3.gaia_source"
397
+
398
+ job = mock_querier_json .launch_job (query , output_format = output_format , dump_to_file = dump_to_file )
399
+
400
+ assert job .async_ is False
401
+ assert job .get_phase () == "COMPLETED"
402
+ assert job .failed is False
403
+ # results
404
+ results = job .get_results ()
405
+
406
+ assert type (results ) is Table
407
+ assert 1 == len (results ), len (results )
408
+
409
+ for colname , attrs in column_attrs_launch_json .items ():
410
+ assert results [colname ].name == attrs .name
411
+ assert results [colname ].description == attrs .description
412
+ assert results [colname ].unit == attrs .unit
413
+ assert results [colname ].dtype == attrs .dtype
392
414
393
415
def test_cone_search_and_changing_MAIN_GAIA_TABLE (mock_querier_async ):
394
416
# Regression test for #2093 and #2099 - changing the MAIN_GAIA_TABLE
0 commit comments