@@ -441,7 +441,7 @@ def cross_match_kwargs():
441
441
442
442
443
443
@pytest .fixture
444
- def cross_match_stream_kwargs ():
444
+ def cross_match_basic_kwargs ():
445
445
return {"table_a_full_qualified_name" : "schemaA.tableA" ,
446
446
"table_a_column_ra" : "ra" ,
447
447
"table_a_column_dec" : "dec" ,
@@ -451,7 +451,7 @@ def cross_match_stream_kwargs():
451
451
452
452
453
453
@pytest .fixture
454
- def cross_match_stream_2_kwargs ():
454
+ def cross_match_basic_2_kwargs ():
455
455
return {"table_a_full_qualified_name" : "user_hola.tableA" ,
456
456
"table_a_column_ra" : "ra" ,
457
457
"table_a_column_dec" : "dec" ,
@@ -1384,7 +1384,7 @@ def make_table_metadata(table_name):
1384
1384
1385
1385
1386
1386
@pytest .mark .parametrize ("background" , [False , True ])
1387
- def test_cross_match_stream (monkeypatch , background , cross_match_stream_kwargs , mock_querier_async ):
1387
+ def test_cross_match_basic (monkeypatch , background , cross_match_basic_kwargs , mock_querier_async ):
1388
1388
def load_table_monkeypatched (self , table , verbose ):
1389
1389
tap_table_a = make_table_metadata ("schemaA.tableA" )
1390
1390
tap_table_b = make_table_metadata ("schemaB.tableB" )
@@ -1394,14 +1394,14 @@ def load_table_monkeypatched(self, table, verbose):
1394
1394
1395
1395
monkeypatch .setattr (Tap , "load_table" , load_table_monkeypatched )
1396
1396
1397
- job = mock_querier_async .cross_match_stream (** cross_match_stream_kwargs , background = background )
1397
+ job = mock_querier_async .cross_match_basic (** cross_match_basic_kwargs , background = background )
1398
1398
assert job .async_ is True
1399
1399
assert job .get_phase () == "EXECUTING" if background else "COMPLETED"
1400
1400
assert job .failed is False
1401
1401
1402
1402
1403
1403
@pytest .mark .parametrize ("background" , [False , True ])
1404
- def test_cross_match_stream_2 (monkeypatch , background , cross_match_stream_2_kwargs , mock_querier_async ):
1404
+ def test_cross_match_basic_2 (monkeypatch , background , cross_match_basic_2_kwargs , mock_querier_async ):
1405
1405
def load_table_monkeypatched (self , table , verbose ):
1406
1406
tap_table_a = make_table_metadata ("user_hola.tableA" )
1407
1407
tap_table_b = make_table_metadata ("user_hola.tableB" )
@@ -1415,14 +1415,14 @@ def update_user_table(self, table_name, list_of_changes, verbose):
1415
1415
monkeypatch .setattr (Tap , "load_table" , load_table_monkeypatched )
1416
1416
monkeypatch .setattr (TapPlus , "update_user_table" , update_user_table )
1417
1417
1418
- job = mock_querier_async .cross_match_stream (** cross_match_stream_2_kwargs , background = background )
1418
+ job = mock_querier_async .cross_match_basic (** cross_match_basic_2_kwargs , background = background )
1419
1419
assert job .async_ is True
1420
1420
assert job .get_phase () == "EXECUTING" if background else "COMPLETED"
1421
1421
assert job .failed is False
1422
1422
1423
1423
1424
1424
@pytest .mark .parametrize ("background" , [False , True ])
1425
- def test_cross_match_stream_3 (monkeypatch , background , mock_querier_async ):
1425
+ def test_cross_match_basic_3 (monkeypatch , background , mock_querier_async ):
1426
1426
mock_querier_async .MAIN_GAIA_TABLE = None
1427
1427
1428
1428
def load_table_monkeypatched_2 (self , table , verbose ):
@@ -1438,15 +1438,15 @@ def update_user_table(self, table_name, list_of_changes, verbose):
1438
1438
monkeypatch .setattr (Tap , "load_table" , load_table_monkeypatched_2 )
1439
1439
monkeypatch .setattr (TapPlus , "update_user_table" , update_user_table )
1440
1440
1441
- job = mock_querier_async .cross_match_stream (table_a_full_qualified_name = "user_hola.tableA" , table_a_column_ra = "ra" ,
1442
- table_a_column_dec = "dec" , background = background )
1441
+ job = mock_querier_async .cross_match_basic (table_a_full_qualified_name = "user_hola.tableA" , table_a_column_ra = "ra" ,
1442
+ table_a_column_dec = "dec" , background = background )
1443
1443
assert job .async_ is True
1444
1444
assert job .get_phase () == "EXECUTING" if background else "COMPLETED"
1445
1445
assert job .failed is False
1446
1446
1447
1447
1448
1448
@pytest .mark .parametrize ("background" , [False , True ])
1449
- def test_cross_match_stream_wrong_column (monkeypatch , background , mock_querier_async ):
1449
+ def test_cross_match_basic_wrong_column (monkeypatch , background , mock_querier_async ):
1450
1450
mock_querier_async .MAIN_GAIA_TABLE = None
1451
1451
1452
1452
def load_table_monkeypatched (self , table , verbose ):
@@ -1464,18 +1464,18 @@ def update_user_table(self, table_name, list_of_changes, verbose):
1464
1464
1465
1465
error_message = "Please check: columns Wrong_ra or dec not available in the table 'user_hola.tableA'"
1466
1466
with pytest .raises (ValueError , match = error_message ):
1467
- mock_querier_async .cross_match_stream (table_a_full_qualified_name = "user_hola.tableA" ,
1468
- table_a_column_ra = "Wrong_ra" , table_a_column_dec = "dec" ,
1469
- background = background )
1467
+ mock_querier_async .cross_match_basic (table_a_full_qualified_name = "user_hola.tableA" ,
1468
+ table_a_column_ra = "Wrong_ra" , table_a_column_dec = "dec" ,
1469
+ background = background )
1470
1470
1471
1471
error_message = "Please check: columns ra or Wrong_dec not available in the table 'user_hola.tableA'"
1472
1472
with pytest .raises (ValueError , match = error_message ):
1473
- mock_querier_async .cross_match_stream (table_a_full_qualified_name = "user_hola.tableA" ,
1474
- table_a_column_ra = "ra" , table_a_column_dec = "Wrong_dec" ,
1475
- background = background )
1473
+ mock_querier_async .cross_match_basic (table_a_full_qualified_name = "user_hola.tableA" ,
1474
+ table_a_column_ra = "ra" , table_a_column_dec = "Wrong_dec" ,
1475
+ background = background )
1476
1476
1477
1477
1478
- def test_cross_match_stream_exceptions (monkeypatch ):
1478
+ def test_cross_match_basic_exceptions (monkeypatch ):
1479
1479
def load_table_monkeypatched (self , table , verbose ):
1480
1480
raise ValueError (f"Not found schema name in full qualified table: '{ table } '" )
1481
1481
@@ -1487,41 +1487,41 @@ def update_user_table(self, table_name, list_of_changes, verbose):
1487
1487
1488
1488
error_message = "Not found table 'user_hola.tableA' in the archive"
1489
1489
with pytest .raises (ValueError , match = error_message ):
1490
- GAIA_QUERIER .cross_match_stream (table_a_full_qualified_name = "user_hola.tableA" , table_a_column_ra = "ra" ,
1491
- table_a_column_dec = "dec" , background = True )
1490
+ GAIA_QUERIER .cross_match_basic (table_a_full_qualified_name = "user_hola.tableA" , table_a_column_ra = "ra" ,
1491
+ table_a_column_dec = "dec" , background = True )
1492
1492
1493
1493
# Check invalid input values
1494
1494
error_message = "Not found schema name in full qualified table: 'hola'"
1495
1495
with pytest .raises (ValueError , match = error_message ):
1496
- GAIA_QUERIER .cross_match_stream (table_a_full_qualified_name = "hola" , table_a_column_ra = "ra" ,
1497
- table_a_column_dec = "dec" )
1496
+ GAIA_QUERIER .cross_match_basic (table_a_full_qualified_name = "hola" , table_a_column_ra = "ra" ,
1497
+ table_a_column_dec = "dec" )
1498
1498
1499
1499
error_message = "Schema name is empty in full qualified table: '.table_name'"
1500
1500
with pytest .raises (ValueError , match = error_message ):
1501
- GAIA_QUERIER .cross_match_stream (table_a_full_qualified_name = ".table_name" , table_a_column_ra = "ra" ,
1502
- table_a_column_dec = "dec" )
1501
+ GAIA_QUERIER .cross_match_basic (table_a_full_qualified_name = ".table_name" , table_a_column_ra = "ra" ,
1502
+ table_a_column_dec = "dec" )
1503
1503
1504
1504
error_message = "Not found schema name in full qualified table: 'hola'"
1505
1505
with pytest .raises (ValueError , match = error_message ):
1506
- GAIA_QUERIER .cross_match_stream (table_a_full_qualified_name = "schema.table_name" , table_a_column_ra = "ra" ,
1507
- table_a_column_dec = "dec" , table_b_full_qualified_name = "hola" )
1506
+ GAIA_QUERIER .cross_match_basic (table_a_full_qualified_name = "schema.table_name" , table_a_column_ra = "ra" ,
1507
+ table_a_column_dec = "dec" , table_b_full_qualified_name = "hola" )
1508
1508
1509
1509
error_message = "Schema name is empty in full qualified table: '.table_name'"
1510
1510
with pytest .raises (ValueError , match = error_message ):
1511
- GAIA_QUERIER .cross_match_stream (table_a_full_qualified_name = "schema.table_name" , table_a_column_ra = "ra" ,
1512
- table_a_column_dec = "dec" , table_b_full_qualified_name = ".table_name" )
1511
+ GAIA_QUERIER .cross_match_basic (table_a_full_qualified_name = "schema.table_name" , table_a_column_ra = "ra" ,
1512
+ table_a_column_dec = "dec" , table_b_full_qualified_name = ".table_name" )
1513
1513
1514
1514
error_message = "Invalid radius value. Found 50.0, valid range is: 0.1 to 10.0"
1515
1515
with pytest .raises (ValueError , match = error_message ):
1516
- GAIA_QUERIER .cross_match_stream (table_a_full_qualified_name = "schema.table_name" , table_a_column_ra = "ra" ,
1517
- table_a_column_dec = "dec" , table_b_full_qualified_name = "schema.table_name" ,
1518
- radius = 50.0 )
1516
+ GAIA_QUERIER .cross_match_basic (table_a_full_qualified_name = "schema.table_name" , table_a_column_ra = "ra" ,
1517
+ table_a_column_dec = "dec" , table_b_full_qualified_name = "schema.table_name" ,
1518
+ radius = 50.0 )
1519
1519
1520
1520
error_message = "Invalid radius value. Found 0.01, valid range is: 0.1 to 10.0"
1521
1521
with pytest .raises (ValueError , match = error_message ):
1522
- GAIA_QUERIER .cross_match_stream (table_a_full_qualified_name = "schema.table_name" , table_a_column_ra = "ra" ,
1523
- table_a_column_dec = "dec" , table_b_full_qualified_name = "schema.table_name" ,
1524
- radius = 0.01 )
1522
+ GAIA_QUERIER .cross_match_basic (table_a_full_qualified_name = "schema.table_name" , table_a_column_ra = "ra" ,
1523
+ table_a_column_dec = "dec" , table_b_full_qualified_name = "schema.table_name" ,
1524
+ radius = 0.01 )
1525
1525
1526
1526
1527
1527
@patch .object (TapPlus , 'login' )
0 commit comments