-
-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New indexing and simulation input tests #805
Conversation
@@ -1,35 +0,0 @@ | |||
### Not currently run by runtests | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These tests where not run, and are superseded by new indexing tests, which does this but are also more extensive
XProblem(rn, u0, (0.0, 1.0), ps); @test true; | ||
else | ||
# Several of these cases do not throw errors (https://github.com/SciML/ModelingToolkit.jl/issues/2624). | ||
@test_broken false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Basically a hack so that we get test broken results in the log (since some tests in the loop passes and some fail, cannot just use test_broken
|
||
# Test remake function. | ||
let | ||
@test_broken false # Currently cannot be run for Ensemble problems: https://github.com/SciML/SciMLBase.jl/issues/661 (as indexing cannot be used to check values). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a test_broken false
as a reminder that there is a missing case to be added to the loop.
test/meta/mtk_structure_indexing.jl
Outdated
# Checks that updating an integrators parameter values does not affect mass action rate until after | ||
# `reset_aggregated_jumps!` have been applied as well (wt which point the correct rate is achieved). | ||
jint.ps[p1] = 4.0 | ||
@test jint.cb.condition.ma_jumps.scaled_rates[1] != 8.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be a bit better to check the previous value is unchanged, so we know the exact expected behavior is happening.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that makes sense. I will update it to do that.
test/runtests.jl
Outdated
@time @safetestset "MTK Structure Indexing" begin include("meta/mtk_structure_indexing.jl") end | ||
@time @safetestset "MTK Problem Inputs" begin include("meta/mtk_problem_inputs.jl") end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd put these higher up in the listing; after we test solution accuracy maybe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I will move them up there
Reupload from #761 (where git could not keep track with all the various branches).
Adds various tests for indexing and creating problems.