Add tests on the dataset names
@@ -64,11 +64,13 @@ def test_datasets_to_io(tmp_path):
assert len(datasets_read) == 2
dataset0 = datasets_read[0]
+ assert dataset0.name == 'gc'
assert dataset0.counts.data.sum() == 22258
assert_allclose(dataset0.exposure.data.sum(), 8.057342e12, atol=0.1)
assert dataset0.psf is not None
assert dataset0.edisp is not None
assert_allclose(dataset0.npred_background().data.sum(), 15726.8, atol=0.1)
+ assert datasets[1].name == 'g09'
dataset_copy = dataset0.copy(name="dataset0-copy")
assert dataset_copy.models is None
