Skip to content

Commit

Permalink
update cons warning test check for updated message
Browse files Browse the repository at this point in the history
  • Loading branch information
TorkelE committed Jun 15, 2024
1 parent eb4ac36 commit 68e72b3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/network_analysis/conservation_laws.jl
Original file line number Diff line number Diff line change
Expand Up @@ -270,21 +270,21 @@ let
# Check warnings in system conversion.
for XSystem in [ODESystem, SDESystem, NonlinearSystem]
@test_nowarn convert(XSystem, rn)
@test_logs (:warn, r"You are creating a system while eliminating conserved quantities. While *") convert(XSystem, rn; remove_conserved = true)
@test_logs (:warn, r"You are creating a system or problem while eliminating conserved quantities. Please *") convert(XSystem, rn; remove_conserved = true)
@test_nowarn convert(XSystem, rn; remove_conserved_warn = false)
@test_nowarn convert(XSystem, rn; remove_conserved = true, remove_conserved_warn = false)
end

# Checks during problem creation (separate depending on whether they have a time span or not).
for XProblem in [ODEProblem, SDEProblem]
@test_nowarn XProblem(rn, u0, tspan, ps)
@test_logs (:warn, r"You are creating a system while eliminating conserved quantities. While *") XProblem(rn, u0, tspan, ps; remove_conserved = true)
@test_logs (:warn, r"You are creating a system or problem while eliminating conserved quantities. Please *") XProblem(rn, u0, tspan, ps; remove_conserved = true)
@test_nowarn XProblem(rn, u0, tspan, ps; remove_conserved_warn = false)
@test_nowarn XProblem(rn, u0, tspan, ps; remove_conserved = true, remove_conserved_warn = false)
end
for XProblem in [NonlinearProblem, SteadyStateProblem]
@test_nowarn XProblem(rn, u0, ps)
@test_logs (:warn, r"You are creating a system while eliminating conserved quantities. While *") XProblem(rn, u0, ps; remove_conserved = true)
@test_logs (:warn, r"You are creating a system or problem while eliminating conserved quantities. Please *") XProblem(rn, u0, ps; remove_conserved = true)
@test_nowarn XProblem(rn, u0, ps; remove_conserved_warn = false)
@test_nowarn XProblem(rn, u0, ps; remove_conserved = true, remove_conserved_warn = false)
end
Expand Down

0 comments on commit 68e72b3

Please sign in to comment.