Skip to content

Commit d8efe11

Browse files
committed
Update tests for nothing as valid nlsolve_alg
- Change test from expecting OverrideInitMissingAlgorithm error to verifying get_initial_values works - Update testset name from "Errors without nlsolve_alg" to "Works without nlsolve_alg" - Add proper abstol/reltol definitions in test scope - Tests now pass with nothing as the default nonlinear solver algorithm 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent b4db702 commit d8efe11

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

test/downstream/initialization.jl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,11 @@ end
241241
@test SciMLBase.initialization_status(prob) == SciMLBase.FULLY_DETERMINED
242242
integ = init(prob; initializealg = NoInit())
243243

244-
@testset "Errors without `nlsolve_alg`" begin
245-
SciMLBase.get_initial_values(prob, integ, fn, SciMLBase.OverrideInit(), Val(false); abstol, reltol)
244+
@testset "Works without `nlsolve_alg`" begin
245+
abstol = 1e-10
246+
reltol = 1e-8
247+
SciMLBase.get_initial_values(
248+
prob, integ, fn, SciMLBase.OverrideInit(), Val(false); abstol, reltol)
246249
end
247250

248251
abstol = 1e-10

test/initialization.jl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,11 @@ end
162162
@test SciMLBase.initialization_status(prob) == SciMLBase.FULLY_DETERMINED
163163
integ = init(prob; initializealg = NoInit())
164164

165-
@testset "Errors without `nlsolve_alg`" begin
166-
@test_throws SciMLBase.OverrideInitMissingAlgorithm SciMLBase.get_initial_values(
167-
prob, integ, fn, SciMLBase.OverrideInit(), Val(false))
165+
@testset "Works without `nlsolve_alg`" begin
166+
abstol = 1e-10
167+
reltol = 1e-10
168+
SciMLBase.get_initial_values(
169+
prob, integ, fn, SciMLBase.OverrideInit(), Val(false); abstol, reltol)
168170
end
169171

170172
abstol = 1e-10

0 commit comments

Comments
 (0)