Skip to content

Commit

Permalink
Add io test pop!
Browse files Browse the repository at this point in the history
Was removed in combination with testing `get_alias`.
  • Loading branch information
vers-w committed Dec 10, 2024
1 parent 8e6331a commit 26d80ab
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/io.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ config = Wflow.Config(tomlpath)
@test config.output isa Wflow.Config
@test collect(keys(config.output)) == ["lateral", "vertical", "path"]

# test removal of key with pop!
val = pop!(config.input, "soil_water__saturated_volume_fraction")
@test val == "thetaS"
@test_throws KeyError config.input.soil_water__saturated_volume_fraction
config.input.soil_water__saturated_volume_fraction = "thetaS"

# modifiers can also be applied
kvconf = Wflow.param(config.input, "soil_surface_water__vertical_saturated_hydraulic_conductivity", nothing)
@test kvconf isa Wflow.Config
Expand Down

0 comments on commit 26d80ab

Please sign in to comment.