-
-
Notifications
You must be signed in to change notification settings - Fork 405
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
70e8271
commit d61409e
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
|
||
import pytest | ||
import astropy.units as u | ||
from astropy.coordinates import SkyCoord | ||
|
||
from .. import Ogle | ||
|
||
|
||
@pytest.mark.remote_data | ||
def test_ogle_single(): | ||
co = SkyCoord(0, 3, unit=(u.degree, u.degree), frame='galactic') | ||
response = Ogle.query_region(coord=co) | ||
assert len(response) == 1 | ||
|
||
|
||
@pytest.mark.remote_data | ||
def test_ogle_list(): | ||
co = SkyCoord(0, 3, unit=(u.degree, u.degree), frame='galactic') | ||
co_list = [co, co, co] | ||
response = Ogle.query_region(coord=co_list) | ||
assert len(response) == 3 | ||
assert response['RA/Lon'][0] == response['RA/Lon'][1] == response['RA/Lon'][2] | ||
|
||
|
||
@pytest.mark.remote_data | ||
def test_ogle_list_values(): | ||
co_list = [[0, 0, 0], [3, 3, 3]] | ||
response = Ogle.query_region(coord=co_list) | ||
assert len(response) == 3 | ||
assert response['RA/Lon'][0] == response['RA/Lon'][1] == response['RA/Lon'][2] |