finally fixed caplog for datasore
@@ -74,12 +74,10 @@ def test_datastore_from_events():
@requires_data()
-def test_datastore_get_observations(data_store):
+ def test_datastore_get_observations(data_store, caplog):
"""Test loading data and IRF files via the DataStore"""
observations = data_store.get_observations([23523, 23592])
assert observations[0].obs_id == 23523
-
- # Test that default is all observations
observations = data_store.get_observations()
assert len(observations) == 105
@@ -88,6 +86,8 @@ def test_datastore_get_observations(data_store):
observations = data_store.get_observations([11111, 23523], skip_missing=True)
assert observations[0].obs_id == 23523
+ assert "WARNING" in [_.levelname for _ in caplog.records]
+ assert "Skipping missing obs_id: 11111" in [_.message for _ in caplog.records]
@requires_data()
