Canonicalize tests to @safetestset for module isolation#55
Closed
ChrisRackauckas-Claude wants to merge 1 commit into
Closed
Canonicalize tests to @safetestset for module isolation#55ChrisRackauckas-Claude wants to merge 1 commit into
ChrisRackauckas-Claude wants to merge 1 commit into
Conversation
Convert the five independent top-level @testset units in test/runtests.jl into @safetestset blocks so each runs in its own module, matching the canonical OrdinaryDiffEq structure (test isolation + world-age safety). Each unit now carries the using/import lines its body needs; the file-scope mooncake_derivative helper moves inside the unit that uses it. Test logic, assertions, and counts are unchanged. Add SafeTestsets to the test deps (compat, extras, targets.test). 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 v1.2 folder conversion on sciml-testing-rollout (#54). |
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.
What
Converts the independent top-level test units in
test/runtests.jlfrom plain@testsetblocks into@safetestsetblocks, so each runs in its own freshly-generated module. This matches the canonical OrdinaryDiffEq test structure and gives per-unit isolation plus world-age safety.Changes
Fast log2,Fast pow,Fast pow - Enzyme forward rule,Fast pow - Enzyme reverse rule,Fast pow - Other AD Engines) become@safetestsetblocks.using/importlines its body relies on are copied into the block (previously these were shared module-level imports at the top ofruntests.jl).mooncake_derivativemoves inside the one unit that uses it (Fast pow - Other AD Engines), since each@safetestsetis its own module.@testset for ...loops (Enzyme forward/reverse rules) stay as plain@testset— the unit-level@safetestsetalready isolates them.SafeTestsetsto the test deps ([compat],[extras],[targets].test).No test logic, assertions, or test counts were changed; the GROUP/run structure is untouched (there is no GROUP ladder here).
Verification
Verified locally with
julia +1.11,Pkg.test()— all units pass with identical counts:Ignore until reviewed by @ChrisRackauckas.