From c5bb6129e81d113c21477187cf5170efee413e13 Mon Sep 17 00:00:00 2001 From: Sam Isaacson Date: Fri, 22 Nov 2024 11:54:21 -0500 Subject: [PATCH] check for SSAStepper --- test/upstream/mtk_structure_indexing.jl | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/test/upstream/mtk_structure_indexing.jl b/test/upstream/mtk_structure_indexing.jl index d986445044..56a67fbbf0 100644 --- a/test/upstream/mtk_structure_indexing.jl +++ b/test/upstream/mtk_structure_indexing.jl @@ -207,11 +207,18 @@ end # Test solve's save_idxs argument. # Currently, `save_idxs` is broken with symbolic stuff (https://github.com/SciML/ModelingToolkit.jl/issues/1761). let - for (prob, solver) in zip(deepcopy([oprob, sprob, jprob]), [Tsit5(), ImplicitEM(), SSAStepper()]) + for (prob, solver) in zip(deepcopy([oprob, sprob]), [Tsit5(), ImplicitEM(), SSAStepper()]) + # Save single variable - @test solve(prob, solver; seed, save_idxs=X)[X][1] == 4 - @test solve(prob, solver; seed, save_idxs=model.X)[X][1] == 4 - @test solve(prob, solver; seed, save_idxs=:X)[X][1] == 4 + if solver isa SSAStepper + @test solve(prob, solver; seed, save_idxs=X)[X][1] == 4 + @test solve(prob, solver; seed, save_idxs=model.X)[X][1] == 4 + @test solve(prob, solver; seed, save_idxs=:X)[X][1] == 4 + else + @test_broken solve(prob, solver; seed, save_idxs=X)[X][1] == 4 + @test_broken solve(prob, solver; seed, save_idxs=model.X)[X][1] == 4 + @test_broken solve(prob, solver; seed, save_idxs=:X)[X][1] == 4 + end # Save observable. @test_broken solve(prob, solver; seed, save_idxs=XY)[XY][1] == 9