Skip to content

Commit

Permalink
ADD: Close dataset to test_accessor
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Jackson authored and Robert Jackson committed Oct 24, 2023
1 parent aaedc8d commit 6448889
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/xradar/test_accessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def test_grid_write_read():
grid1.metadata["comment"] = "This is another comment"

with pyart.testing.InTemporaryDirectory():
tmpfile = "tmp_grid.nc"
tmpfile = "tmp_grid2.nc"
pyart.io.write_grid(tmpfile, grid1)
grid2 = xr.open_dataset(tmpfile, decode_times=False)
grid2 = pyart.xradar.Xgrid(grid2)
Expand Down Expand Up @@ -130,3 +130,4 @@ def test_grid_write_read():
_check_attrs_similar(grid1, grid2, "radar_time")
assert grid1.radar_name["data"] == grid2.radar_name["data"]
assert grid1.nradar == grid2.nradar
grid2.ds.close()

0 comments on commit 6448889

Please sign in to comment.