add test for missing case
@@ -162,6 +162,22 @@ def test_significance_map_estimator_map_dataset_exposure(simple_dataset):
assert_allclose(result["npred_excess"].data.sum(), 19733.602, rtol=1e-3)
assert_allclose(result["sqrt_ts"].data[0, 10, 10], 4.217129, rtol=1e-3)
+ # without mask safe
+ simple_dataset_no_mask = MapDataset(counts=simple_dataset.counts,
+ exposure = simple_dataset.exposure,
+ background = simple_dataset.background,
+ psf = simple_dataset.psf,
+ edisp = simple_dataset.edisp)
+
+ simple_dataset_no_mask.models = [model]
+ simple_dataset_no_mask.npred()
+
+ result_no_mask = estimator.run(simple_dataset_no_mask)
+ assert_allclose(result_no_mask["npred_excess"].data.sum(), 19733.602, rtol=1e-3)
+ assert_allclose(result_no_mask["sqrt_ts"].data[0, 10, 10], 4.217129, rtol=1e-3)
+
+
+
def test_excess_map_estimator_map_dataset_on_off_no_correlation(
simple_dataset_on_off,
