|
3 | 3 | import pytest
|
4 | 4 | import astropy.units as u
|
5 | 5 | from astropy.tests.helper import assert_quantity_allclose
|
6 |
| -from astropy.utils import minversion |
7 | 6 | from astropy.coordinates import SkyCoord
|
8 | 7 |
|
9 | 8 | from ...exoplanet_orbit_database import ExoplanetOrbitDatabase
|
10 | 9 |
|
11 |
| -APY_LT12 = not minversion('astropy', '1.2') |
12 | 10 | LOCAL_TABLE_PATH = os.path.join(os.path.abspath(os.path.dirname(__file__)),
|
13 | 11 | 'data', 'exoplanet_orbit_database.csv')
|
14 | 12 |
|
@@ -54,25 +52,6 @@ def test_hd209458b_exoplanet_orbit_database():
|
54 | 52 | assert params['TRANSIT']
|
55 | 53 |
|
56 | 54 |
|
57 |
| -@pytest.mark.remote_data |
58 |
| -@pytest.mark.skipif('APY_LT12') |
59 |
| -def test_hd209458b_exoplanet_orbit_database_apy_lt12(): |
60 |
| - # Testing intentionally un-stripped string: |
61 |
| - params = ExoplanetOrbitDatabase.query_planet('HD 209458 b ') |
62 |
| - assert_quantity_allclose(params["R"], 1.320 * u.Unit('R_jup'), |
63 |
| - atol=0.1 * u.Unit('R_jup')) |
64 |
| - |
65 |
| - |
66 |
| -@pytest.mark.remote_data |
67 |
| -@pytest.mark.skipif('not APY_LT12') |
68 |
| -def test_hd209458b_exoplanet_orbit_database_apy_gt12(): |
69 |
| - # Testing intentionally un-stripped string: |
70 |
| - with pytest.raises(ValueError): |
71 |
| - params = ExoplanetOrbitDatabase.query_planet('HD 209458 b ') |
72 |
| - assert_quantity_allclose(params['R'], 1.320 * u.Unit('R_jup'), |
73 |
| - atol=0.1 * u.Unit('R_jup')) |
74 |
| - |
75 |
| - |
76 | 55 | @pytest.mark.remote_data
|
77 | 56 | def test_hd209458b_exoplanet_orbit_database_coords():
|
78 | 57 | params = ExoplanetOrbitDatabase.query_planet('HD 209458 b ')
|
@@ -100,25 +79,6 @@ def test_hd209458b_exoplanet_orbit_database_local():
|
100 | 79 | assert params['TRANSIT']
|
101 | 80 |
|
102 | 81 |
|
103 |
| -@pytest.mark.skipif('APY_LT12') |
104 |
| -def test_hd209458b_exoplanet_orbit_database_apy_lt12_local(): |
105 |
| - # Testing intentionally un-stripped string: |
106 |
| - params = ExoplanetOrbitDatabase.query_planet('HD 209458 b ', |
107 |
| - table_path=LOCAL_TABLE_PATH) |
108 |
| - assert_quantity_allclose(params["R"], 1.320 * u.Unit('R_jup'), |
109 |
| - atol=0.1 * u.Unit('R_jup')) |
110 |
| - |
111 |
| - |
112 |
| -@pytest.mark.skipif('not APY_LT12') |
113 |
| -def test_hd209458b_exoplanet_orbit_database_apy_gt12_local(): |
114 |
| - # Testing intentionally un-stripped string: |
115 |
| - with pytest.raises(ValueError): |
116 |
| - params = ExoplanetOrbitDatabase.query_planet('HD 209458 b ', |
117 |
| - table_path=LOCAL_TABLE_PATH) |
118 |
| - assert_quantity_allclose(params['R'], 1.320 * u.Unit('R_jup'), |
119 |
| - atol=0.1 * u.Unit('R_jup')) |
120 |
| - |
121 |
| - |
122 | 82 | def test_hd209458b_exoplanet_orbit_database_coords_local():
|
123 | 83 | params = ExoplanetOrbitDatabase.query_planet('HD 209458 b ',
|
124 | 84 | table_path=LOCAL_TABLE_PATH)
|
|
0 commit comments