added caplog for test_safe
@@ -16,7 +16,7 @@ def observations():
@requires_data()
-def test_safe_mask_maker(observations):
+def test_safe_mask_maker(observations, caplog):
obs = observations[0]
axis = MapAxis.from_bounds(
@@ -51,3 +51,6 @@ def test_safe_mask_maker(observations):
mask_bkg_peak = safe_mask_maker.make_mask_energy_bkg_peak(dataset)
assert_allclose(mask_bkg_peak.data.sum(), 1815)
+ #assert "No default thresholds defined for obs"
+ assert caplog.records[-1].levelname == "WARNING"
+ assert caplog.records[-1].message == "No default thresholds defined for obs 110380"
