Skip to content

Canonicalize test units to @safetestset#25

Closed
ChrisRackauckas-Claude wants to merge 1 commit into
SciML:mainfrom
ChrisRackauckas-Claude:canonicalize-safetestset
Closed

Canonicalize test units to @safetestset#25
ChrisRackauckas-Claude wants to merge 1 commit into
SciML:mainfrom
ChrisRackauckas-Claude:canonicalize-safetestset

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Collaborator

Summary

Wraps each independent test unit in @safetestset so 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 @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.
  • test/qa/qa.jl: the JET unit becomes @safetestset; its body is extracted to test/qa/jet_tests.jl and included (so using JET runs before JET.@test_opt is reached, avoiding the macro-not-yet-defined macroexpand gotcha).
  • Added SafeTestsets to the test deps (root [extras]/[targets] and test/qa/Project.toml) with compat "0.1, 1".

The GROUP dispatch, 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.jl 77/77 pass.
  • GROUP=QA: JET Static Analysis 12/12 pass.

🤖 Generated with Claude Code

Ignore until reviewed by @ChrisRackauckas.

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>
@ChrisRackauckas-Claude

Copy link
Copy Markdown
Collaborator Author

Superseded by the v1.2 folder conversion on sciml-testing-rollout (#24).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants