diff --git a/tests/test_datasets/test_fapar_lai.py b/tests/test_datasets/test_fapar_lai.py index 0ac135b..504f2d4 100644 --- a/tests/test_datasets/test_fapar_lai.py +++ b/tests/test_datasets/test_fapar_lai.py @@ -100,8 +100,8 @@ def ingest_lai(): f = c.submit(ingest_lai) f.result() - ds = xr.open_mfdataset((ingest_dir / "fapar-lai").glob("*.nc")) - assert isinstance(ds, xr.Dataset) + with xr.open_mfdataset((ingest_dir / "fapar-lai").glob("*.nc")) as ds: + assert isinstance(ds, xr.Dataset) def test_load(self): """Test load function."""