@@ -461,8 +461,8 @@ prob = ODEProblem(simpsys, [z => 1.0, y => 1.0], tspan, guesses = [x => 2.0])
461461sol = solve (prob, Tsit5 ())
462462@test sol[[x, y], 1 ] == [0.0 , 1.0 ]
463463
464- # This should warn, but logging tests can't be marked as broken
465- @test_logs prob = ODEProblem ( simpsys, [], tspan, guesses = [x => 2.0 ])
464+ @test_throws ModelingToolkit . IncompleteInitializationError ODEProblem (
465+ simpsys, [], tspan, guesses = [x => 2.0 ])
466466
467467# Late Binding initialization_eqs
468468# https://github.com/SciML/ModelingToolkit.jl/issues/2787
923923 [D (x) ~ 2 x + r + rhss, r ~ p + 2 q, q ~ p + 3 ], t;
924924 guesses = [p => 1.0 ])
925925 prob = Problem (sys, [x => 1.0 , p => missing ], (0.0 , 1.0 ))
926- @test length (equations (ModelingToolkit. get_parent (prob. f. initialization_data. initializeprob. f. sys))) ==
927- 4
926+ parent_isys = ModelingToolkit. get_parent (prob. f. initialization_data. initializeprob. f. sys)
927+ @test length (equations (parent_isys)) == 3
928+ @test length (observed (parent_isys)) == 1
928929 integ = init (prob, alg)
929930 @test integ. ps[p] ≈ 2
930931 end
@@ -1343,7 +1344,7 @@ end
13431344 @test ModelingToolkit. is_parameter_solvable (p, Dict (), defaults (sys), guesses (sys))
13441345 prob = ODEProblem (sys, [x => 1.0 , q => 2.0 ], (0.0 , 1.0 ))
13451346 initsys = prob. f. initialization_data. initializeprob. f. sys
1346- @test length (ModelingToolkit. observed (initsys)) == 4
1347+ @test length (ModelingToolkit. observed (initsys)) == 2
13471348 sol = solve (prob, Tsit5 ())
13481349 @test sol. ps[p] ≈ [2.0 , 4.0 ]
13491350end
0 commit comments