Skip to content

Commit 26d36a6

Browse files
committed
Add an additional test
1 parent 0a5fb4f commit 26d36a6

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/opencosmo/spatial/region.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,9 @@ def _(self, other: ConeRegion):
231231
def _(self, coords: SkyCoord):
232232
return True
233233

234+
def into_model(self):
235+
return None
236+
234237

235238
@FullSkyRegion._contains.register # type: ignore
236239
def _(self, other: FullSkyRegion):

test/test_lightcone.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,5 +387,10 @@ def test_lc_collection_sort_and_take(
387387
assert np.all(halo_masses[:100] == data)
388388

389389

390-
def test_write_single_lightcone():
391-
raise NotImplementedError()
390+
def test_write_single_lightcone(haloproperties_600_path, tmp_path):
391+
ds = oc.open(haloproperties_600_path)
392+
assert isinstance(ds, oc.Lightcone)
393+
oc.write(tmp_path / "temp.hdf5", ds)
394+
ds_written = oc.open(tmp_path / "temp.hdf5")
395+
assert isinstance(ds, oc.Lightcone)
396+
assert len(ds) == len(ds_written)

0 commit comments

Comments
 (0)