Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
Signed-off-by: Régis Terrier <rterrier@apc.in2p3.fr>
  • Loading branch information
registerrier committed May 16, 2024
1 parent a00a6cd commit a048535
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions gammapy/estimators/points/tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,14 @@ def test_write_fits(self, tmp_path, flux_points):
assert str(flux_points) == str(actual)

def test_write_ecsv(self, tmp_path, flux_points):
filename = tmp_path / "flux_points.ecsv"
filename.touch()
flux_points.write(
tmp_path / "flux_points.ecsv",
filename,
sed_type=flux_points.sed_type_init,
overwrite=True,
)
actual = FluxPoints.read(tmp_path / "flux_points.ecsv")
actual = FluxPoints.read(filename)
actual._data.pop("is_ul", None)
flux_points._data.pop("is_ul", None)
assert str(flux_points) == str(actual)
Expand Down

0 comments on commit a048535

Please sign in to comment.