Canonicalize tests to @safetestset for module isolation#1147
Closed
ChrisRackauckas-Claude wants to merge 1 commit into
Closed
Canonicalize tests to @safetestset for module isolation#1147ChrisRackauckas-Claude wants to merge 1 commit into
ChrisRackauckas-Claude wants to merge 1 commit into
Conversation
Convert the independent inner @testset units in test/runtests.jl to @safetestset so each test unit runs in its own module, matching the canonical OrdinaryDiffEq structure (isolation + world-age safety). Each @safetestset body is made self-contained with its own `using DifferentialEquations, Test`. The outer `@testset "DifferentialEquations"` wrapper and the `@time` block are kept so the grouped summary is preserved. No test logic or assertions changed; the same 17 assertions run. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
Author
|
Superseded by the SciMLTesting v1.2 PR #1145 (grouped-tests + run_tests + @safetestset). Closing this canonicalize-only PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Canonicalizes
test/runtests.jlso each independent test unit runs in its own module via@safetestset, matching the canonical OrdinaryDiffEq structure (isolation between tests + world-age safety).Classification
PLAIN-TESTSET: the suite was a single outer
@testset "DifferentialEquations"wrapping 8 independent inner plain@testsetunits, all sharing only the top-levelusing DifferentialEquations, Test, SafeTestsets.What changed
@testset "X" begin ... end->@safetestset "X" begin ... end.@safetestsetbody is made self-contained with its ownusing DifferentialEquations, Test.@testset "DifferentialEquations"wrapper and the@time begin ... endblock are kept, so the grouped test summary is preserved (@safetestsetnests fine inside@testset).What did NOT change
ODEProblem,Tsit5,solve, ...) at runtime, so an inline@safetestsetbody withusing DifferentialEquations, Testis sufficient (noinclude()indirection needed).SafeTestsetswas already in[extras]+[targets].test, soProject.tomlis unchanged.Verification
Ran locally with
julia +1.11Pkg.test():Ignore until reviewed by @ChrisRackauckas.
🤖 Generated with Claude Code