Canonicalize test units to @safetestset#25
Closed
ChrisRackauckas-Claude wants to merge 1 commit into
Closed
Conversation
Wrap each independent test unit in @safetestset so it runs in its own module (isolation between units + world-age safety), matching the canonical OrdinaryDiffEq structure. - runtests.jl: the four units inside the "DataCollocations.jl" testset (Kernel Functions, Collocation of data, DataInterpolations Extension, Interface Compatibility) become @safetestset blocks, each carrying its own imports. The shared bounded/unbounded kernel lists move to a small test/kernels_setup.jl that the two units depending on them include. - qa/qa.jl: the JET unit becomes @safetestset; its body is extracted to qa/jet_tests.jl and included (so `using JET` runs before JET.@test_opt is reached, avoiding the macro-not-yet-defined macroexpand gotcha). - Add SafeTestsets to the test deps (root [extras]/[targets] and test/qa/Project.toml) with compat "0.1, 1". GROUP dispatch, the tests that run, and all assertions are unchanged. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Collaborator
Author
|
Superseded by the v1.2 folder conversion on sciml-testing-rollout (#24). |
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
Wraps each independent test unit in
@safetestsetso it runs in its own module, giving isolation between units and world-age safety, matching the canonical OrdinaryDiffEq test structure.Changes
test/runtests.jl: the four units inside the"DataCollocations.jl"testset (Kernel Functions, Collocation of data, DataInterpolations Extension, Interface Compatibility) become@safetestsetblocks, each carrying its own imports. The shared bounded/unbounded kernel lists move to a smalltest/kernels_setup.jlthat the two units depending on theminclude.test/qa/qa.jl: the JET unit becomes@safetestset; its body is extracted totest/qa/jet_tests.jlandincluded (sousing JETruns beforeJET.@test_optis reached, avoiding the macro-not-yet-defined macroexpand gotcha).SafeTestsetsto the test deps (root[extras]/[targets]andtest/qa/Project.toml) with compat"0.1, 1".The
GROUPdispatch, the set of tests that run, and all assertions are unchanged. Behavior-preserving: only unit wrapping + self-containment.Verification
Ran locally with Julia 1.11:
GROUP=Core:DataCollocations.jl77/77 pass.GROUP=QA:JET Static Analysis12/12 pass.🤖 Generated with Claude Code
Ignore until reviewed by @ChrisRackauckas.