@@ -447,7 +447,7 @@ def cross_match_kwargs():
447
447
448
448
449
449
@pytest .fixture
450
- def cross_match_stream_kwargs ():
450
+ def cross_match_basic_kwargs ():
451
451
return {"table_a_full_qualified_name" : "schemaA.tableA" ,
452
452
"table_a_column_ra" : "ra" ,
453
453
"table_a_column_dec" : "dec" ,
@@ -457,7 +457,7 @@ def cross_match_stream_kwargs():
457
457
458
458
459
459
@pytest .fixture
460
- def cross_match_stream_2_kwargs ():
460
+ def cross_match_basic_2_kwargs ():
461
461
return {"table_a_full_qualified_name" : "user_hola.tableA" ,
462
462
"table_a_column_ra" : "ra" ,
463
463
"table_a_column_dec" : "dec" ,
@@ -1390,7 +1390,7 @@ def make_table_metadata(table_name):
1390
1390
1391
1391
1392
1392
@pytest .mark .parametrize ("background" , [False , True ])
1393
- def test_cross_match_stream (monkeypatch , background , cross_match_stream_kwargs , mock_querier_async ):
1393
+ def test_cross_match_basic (monkeypatch , background , cross_match_basic_kwargs , mock_querier_async ):
1394
1394
def load_table_monkeypatched (self , table , verbose ):
1395
1395
tap_table_a = make_table_metadata ("schemaA.tableA" )
1396
1396
tap_table_b = make_table_metadata ("schemaB.tableB" )
@@ -1400,14 +1400,14 @@ def load_table_monkeypatched(self, table, verbose):
1400
1400
1401
1401
monkeypatch .setattr (Tap , "load_table" , load_table_monkeypatched )
1402
1402
1403
- job = mock_querier_async .cross_match_stream (** cross_match_stream_kwargs , background = background )
1403
+ job = mock_querier_async .cross_match_basic (** cross_match_basic_kwargs , background = background )
1404
1404
assert job .async_ is True
1405
1405
assert job .get_phase () == "EXECUTING" if background else "COMPLETED"
1406
1406
assert job .failed is False
1407
1407
1408
1408
1409
1409
@pytest .mark .parametrize ("background" , [False , True ])
1410
- def test_cross_match_stream_2 (monkeypatch , background , cross_match_stream_2_kwargs , mock_querier_async ):
1410
+ def test_cross_match_basic_2 (monkeypatch , background , cross_match_basic_2_kwargs , mock_querier_async ):
1411
1411
def load_table_monkeypatched (self , table , verbose ):
1412
1412
tap_table_a = make_table_metadata ("user_hola.tableA" )
1413
1413
tap_table_b = make_table_metadata ("user_hola.tableB" )
@@ -1421,14 +1421,14 @@ def update_user_table(self, table_name, list_of_changes, verbose):
1421
1421
monkeypatch .setattr (Tap , "load_table" , load_table_monkeypatched )
1422
1422
monkeypatch .setattr (TapPlus , "update_user_table" , update_user_table )
1423
1423
1424
- job = mock_querier_async .cross_match_stream (** cross_match_stream_2_kwargs , background = background )
1424
+ job = mock_querier_async .cross_match_basic (** cross_match_basic_2_kwargs , background = background )
1425
1425
assert job .async_ is True
1426
1426
assert job .get_phase () == "EXECUTING" if background else "COMPLETED"
1427
1427
assert job .failed is False
1428
1428
1429
1429
1430
1430
@pytest .mark .parametrize ("background" , [False , True ])
1431
- def test_cross_match_stream_3 (monkeypatch , background , mock_querier_async ):
1431
+ def test_cross_match_basic_3 (monkeypatch , background , mock_querier_async ):
1432
1432
mock_querier_async .MAIN_GAIA_TABLE = None
1433
1433
1434
1434
def load_table_monkeypatched_2 (self , table , verbose ):
@@ -1444,15 +1444,15 @@ def update_user_table(self, table_name, list_of_changes, verbose):
1444
1444
monkeypatch .setattr (Tap , "load_table" , load_table_monkeypatched_2 )
1445
1445
monkeypatch .setattr (TapPlus , "update_user_table" , update_user_table )
1446
1446
1447
- job = mock_querier_async .cross_match_stream (table_a_full_qualified_name = "user_hola.tableA" , table_a_column_ra = "ra" ,
1448
- table_a_column_dec = "dec" , background = background )
1447
+ job = mock_querier_async .cross_match_basic (table_a_full_qualified_name = "user_hola.tableA" , table_a_column_ra = "ra" ,
1448
+ table_a_column_dec = "dec" , background = background )
1449
1449
assert job .async_ is True
1450
1450
assert job .get_phase () == "EXECUTING" if background else "COMPLETED"
1451
1451
assert job .failed is False
1452
1452
1453
1453
1454
1454
@pytest .mark .parametrize ("background" , [False , True ])
1455
- def test_cross_match_stream_wrong_column (monkeypatch , background , mock_querier_async ):
1455
+ def test_cross_match_basic_wrong_column (monkeypatch , background , mock_querier_async ):
1456
1456
mock_querier_async .MAIN_GAIA_TABLE = None
1457
1457
1458
1458
def load_table_monkeypatched (self , table , verbose ):
@@ -1470,18 +1470,18 @@ def update_user_table(self, table_name, list_of_changes, verbose):
1470
1470
1471
1471
error_message = "Please check: columns Wrong_ra or 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 = "Wrong_ra" , table_a_column_dec = "dec" ,
1475
- background = background )
1473
+ mock_querier_async .cross_match_basic (table_a_full_qualified_name = "user_hola.tableA" ,
1474
+ table_a_column_ra = "Wrong_ra" , table_a_column_dec = "dec" ,
1475
+ background = background )
1476
1476
1477
1477
error_message = "Please check: columns ra or Wrong_dec not available in the table 'user_hola.tableA'"
1478
1478
with pytest .raises (ValueError , match = error_message ):
1479
- mock_querier_async .cross_match_stream (table_a_full_qualified_name = "user_hola.tableA" ,
1480
- table_a_column_ra = "ra" , table_a_column_dec = "Wrong_dec" ,
1481
- background = background )
1479
+ mock_querier_async .cross_match_basic (table_a_full_qualified_name = "user_hola.tableA" ,
1480
+ table_a_column_ra = "ra" , table_a_column_dec = "Wrong_dec" ,
1481
+ background = background )
1482
1482
1483
1483
1484
- def test_cross_match_stream_exceptions (monkeypatch ):
1484
+ def test_cross_match_basic_exceptions (monkeypatch ):
1485
1485
def load_table_monkeypatched (self , table , verbose ):
1486
1486
raise ValueError (f"Not found schema name in full qualified table: '{ table } '" )
1487
1487
@@ -1493,41 +1493,41 @@ def update_user_table(self, table_name, list_of_changes, verbose):
1493
1493
1494
1494
error_message = "Not found table 'user_hola.tableA' in the archive"
1495
1495
with pytest .raises (ValueError , match = error_message ):
1496
- GAIA_QUERIER .cross_match_stream (table_a_full_qualified_name = "user_hola.tableA" , table_a_column_ra = "ra" ,
1497
- table_a_column_dec = "dec" , background = True )
1496
+ GAIA_QUERIER .cross_match_basic (table_a_full_qualified_name = "user_hola.tableA" , table_a_column_ra = "ra" ,
1497
+ table_a_column_dec = "dec" , background = True )
1498
1498
1499
1499
# Check invalid input values
1500
1500
error_message = "Not found schema name in full qualified table: 'hola'"
1501
1501
with pytest .raises (ValueError , match = error_message ):
1502
- GAIA_QUERIER .cross_match_stream (table_a_full_qualified_name = "hola" , table_a_column_ra = "ra" ,
1503
- table_a_column_dec = "dec" )
1502
+ GAIA_QUERIER .cross_match_basic (table_a_full_qualified_name = "hola" , table_a_column_ra = "ra" ,
1503
+ table_a_column_dec = "dec" )
1504
1504
1505
1505
error_message = "Schema name is empty in full qualified table: '.table_name'"
1506
1506
with pytest .raises (ValueError , match = error_message ):
1507
- GAIA_QUERIER .cross_match_stream (table_a_full_qualified_name = ".table_name" , table_a_column_ra = "ra" ,
1508
- table_a_column_dec = "dec" )
1507
+ GAIA_QUERIER .cross_match_basic (table_a_full_qualified_name = ".table_name" , table_a_column_ra = "ra" ,
1508
+ table_a_column_dec = "dec" )
1509
1509
1510
1510
error_message = "Not found schema name in full qualified table: 'hola'"
1511
1511
with pytest .raises (ValueError , match = error_message ):
1512
- GAIA_QUERIER .cross_match_stream (table_a_full_qualified_name = "schema.table_name" , table_a_column_ra = "ra" ,
1513
- table_a_column_dec = "dec" , table_b_full_qualified_name = "hola" )
1512
+ GAIA_QUERIER .cross_match_basic (table_a_full_qualified_name = "schema.table_name" , table_a_column_ra = "ra" ,
1513
+ table_a_column_dec = "dec" , table_b_full_qualified_name = "hola" )
1514
1514
1515
1515
error_message = "Schema name is empty in full qualified table: '.table_name'"
1516
1516
with pytest .raises (ValueError , match = error_message ):
1517
- GAIA_QUERIER .cross_match_stream (table_a_full_qualified_name = "schema.table_name" , table_a_column_ra = "ra" ,
1518
- table_a_column_dec = "dec" , table_b_full_qualified_name = ".table_name" )
1517
+ GAIA_QUERIER .cross_match_basic (table_a_full_qualified_name = "schema.table_name" , table_a_column_ra = "ra" ,
1518
+ table_a_column_dec = "dec" , table_b_full_qualified_name = ".table_name" )
1519
1519
1520
1520
error_message = "Invalid radius value. Found 50.0, 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 = 50.0 )
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 = 50.0 )
1525
1525
1526
1526
error_message = "Invalid radius value. Found 0.01, valid range is: 0.1 to 10.0"
1527
1527
with pytest .raises (ValueError , match = error_message ):
1528
- GAIA_QUERIER .cross_match_stream (table_a_full_qualified_name = "schema.table_name" , table_a_column_ra = "ra" ,
1529
- table_a_column_dec = "dec" , table_b_full_qualified_name = "schema.table_name" ,
1530
- radius = 0.01 )
1528
+ GAIA_QUERIER .cross_match_basic (table_a_full_qualified_name = "schema.table_name" , table_a_column_ra = "ra" ,
1529
+ table_a_column_dec = "dec" , table_b_full_qualified_name = "schema.table_name" ,
1530
+ radius = 0.01 )
1531
1531
1532
1532
1533
1533
@patch .object (TapPlus , 'login' )
0 commit comments