Skip to content

Commit

Permalink
accept exception Union{NCDatasets.NetCDFError,DimensionMismatch}
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander-Barth committed Aug 21, 2024
1 parent fab5d2e commit 2d0e7cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/test_variable.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ NCDataset(filename,"c") do ds
ds.dim["lat"] = sz[2]

v = defVar(ds,"small",Float64,("lon","lat"))
# @test_throws Union{NCDatasets.NetCDFError,DimensionMismatch} v[:] = zeros(sz[1]+1,sz[2])
@test_throws DimensionMismatch v[1:sz[1],1:sz[2]] = zeros(sz[1]+1,sz[2])
@test_throws Union{NCDatasets.NetCDFError,DimensionMismatch} v[:] = zeros(sz[1]+1,sz[2])
#@test_throws DimensionMismatch v[1:sz[1],1:sz[2]] = zeros(sz[1]+1,sz[2])
@test_throws NCDatasets.NetCDFError v[sz[1]+1,1] = 1
@test_throws NCDatasets.NetCDFError v[-1,1] = 1

Expand Down

0 comments on commit 2d0e7cb

Please sign in to comment.