Skip to content

Commit 8efa2af

Browse files
committed
Test tweaks
1 parent e139f03 commit 8efa2af

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

aiapy/calibrate/tests/test_meta.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ def test_fix_observer_location(aia_171_map) -> None:
2020

2121

2222
@pytest.fixture
23-
def pointing_table(aia_171_map):
24-
return get_pointing_table(aia_171_map.date - 6 * u.h, aia_171_map.date + 6 * u.h, source="lmsal")
23+
def pointing_table():
24+
return get_pointing_table("lmsal")
2525

2626

2727
@pytest.fixture
@@ -54,7 +54,7 @@ def test_fix_pointing(aia_171_map, pointing_table) -> None:
5454
aia_171_map.meta.pop(k)
5555
aia_map_updated = update_pointing(
5656
aia_171_map,
57-
pointing_table=get_pointing_table(aia_171_map.date - 6 * u.h, aia_171_map.date + 6 * u.h, source="lmsal"),
57+
pointing_table=get_pointing_table("lmsal"),
5858
)
5959
# FIXME: how do we check these values are accurate?
6060
assert all(k in aia_map_updated.meta for k in keys)

aiapy/calibrate/tests/test_util.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
pytest.param("jsoc", marks=pytest.mark.remote_data),
2626
pytest.param(3, marks=pytest.mark.remote_data),
2727
pytest.param(4, marks=pytest.mark.remote_data),
28-
pytest.param(5, marks=pytest.mark.remote_data),
2928
pytest.param(6, marks=pytest.mark.remote_data),
3029
pytest.param(7, marks=pytest.mark.remote_data),
3130
pytest.param(8, marks=pytest.mark.remote_data),
@@ -106,8 +105,8 @@ def test_pointing_table() -> None:
106105
f"A_{c}_IMSCALE",
107106
]
108107
t = astropy.time.Time("2011-01-01T00:00:00", scale="utc")
109-
table_lmsal = get_pointing_table(t - 3 * u.h, t + 3 * u.h, source="lmsal")
110-
table_jsoc = get_pointing_table(t - 3 * u.h, t + 3 * u.h, source="jsoc")
108+
table_lmsal = get_pointing_table("lmsal")
109+
table_jsoc = get_pointing_table("jsoc", start=t - 3 * u.h, end=t + 3 * u.h)
111110
for table in [table_lmsal, table_jsoc]:
112111
assert isinstance(table, astropy.table.QTable)
113112
assert all(cn in table.colnames for cn in expected_columns)
@@ -124,7 +123,7 @@ def test_pointing_table_unavailable() -> None:
124123
# Check that missing pointing data raises a nice error
125124
t = astropy.time.Time("1990-01-01")
126125
with pytest.raises(RuntimeError, match="Could not find any pointing information"):
127-
get_pointing_table(t - 3 * u.h, t + 3 * u.h, source="jsoc")
126+
get_pointing_table("jsoc", start=t - 3 * u.h, end=t + 3 * u.h)
128127

129128

130129
@pytest.mark.parametrize(

0 commit comments

Comments
 (0)