diff --git a/core/test/bmi_test.jl b/core/test/bmi_test.jl index a9d714874..c7f1b559c 100644 --- a/core/test/bmi_test.jl +++ b/core/test/bmi_test.jl @@ -11,11 +11,12 @@ @test BMI.get_end_time(model) ≈ 3.16224e7 BMI.update(model) @test BMI.get_current_time(model) ≈ dt0 atol = 5e-3 - # cannot go back in time - @test_throws ErrorException BMI.update_until(model, dt0 / 2.0) @test BMI.get_current_time(model) ≈ dt0 atol = 5e-3 BMI.update_until(model, 86400.0) @test BMI.get_current_time(model) == 86400.0 + # cannot go back in time + @test_throws ErrorException BMI.update_until(model, 3600.0) + @test BMI.get_current_time(model) == 86400.0 end @testitem "fixed timestepping" begin diff --git a/core/test/control_test.jl b/core/test/control_test.jl index 3109cc1e7..a9efea9cb 100644 --- a/core/test/control_test.jl +++ b/core/test/control_test.jl @@ -247,7 +247,7 @@ end t_switch = Ribasim.datetime_since(record.time[2], p.starttime) flow_table = DataFrame(Ribasim.flow_table(model)) - @test all(filter(:time => time -> time <= t_switch, flow_table).flow_rate .> 0) + @test all(filter(:time => time -> time <= t_switch, flow_table).flow_rate .> -1e-12) @test all( isapprox.( filter(:time => time -> time > t_switch, flow_table).flow_rate,