Skip to content

Commit

Permalink
close files
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander-Barth committed Jan 31, 2024
1 parent a7c4e16 commit 907a25e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/test_cfconventions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ function myplot(height::NCDatasets.AbstractVariable)
end
myplot(height)
=#

close(ds)

fname = tempname()

Expand Down Expand Up @@ -164,7 +164,6 @@ close(ds)


ds = NCDataset(fname)

# This produces an error because it is unclear if we should load lon_u or lon_v
@test_throws KeyError ds[CF"longitude"] # error

Expand All @@ -177,3 +176,4 @@ nclon_u2 = ds["ubar"]["lon_u"]

nclon_u2 = ds["ubar"][:lon_u]
@test name(nclon_u2) == "lon_u"
close(ds)
1 change: 1 addition & 0 deletions test/test_variable.jl
Original file line number Diff line number Diff line change
Expand Up @@ -287,3 +287,4 @@ data2 = zeros(Int,1)
data2 = zeros(Int,10)
# asking too many elements
@test_throws BoundsError NCDatasets.load!(ds["data"].var,data2,1:10)
close(ds)

0 comments on commit 907a25e

Please sign in to comment.