Skip to content

Canonicalize remaining plain @testset units to @safetestset#461

Merged
ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:canonicalize-safetestset
Jun 15, 2026
Merged

Canonicalize remaining plain @testset units to @safetestset#461
ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:canonicalize-safetestset

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Contributor

Converts the independent test units in test/runtests.jl that were still plain @testset "X" begin include(...) end into @safetestset, so each runs in its own module (test isolation + world-age safety), matching the units in this suite that are already @safetestset.

Converted:

  • GPU Kernelized Non Stiff ODE Regression
  • GPU Kernelized Stiff ODE Regression
  • Lower level API
  • The four nested units inside the Callbacks group: Non Stiff ODE ContinuousCallback, Stiff ODE ContinuousCallback, SDE Regression, SDE Convergence.

Left unchanged:

  • Distributed Multi-GPU stays a plain @testset — distributed addprocs/@everywhere does not play nicely with modules (as the file comment notes).
  • The outer Callbacks grouping @testset is kept as a wrapper; nested units inside it are now @safetestset.
  • GROUP-dispatch ladder, QA/JET block, run logic, and all assertions are unchanged.

The included files are already self-contained (own using lines + shared utils.jl include), and SafeTestsets injects using Test into each module so the bare @test calls resolve. SafeTestsets is already a test dependency, so no Project.toml change was needed.

Verification: static — Meta.parseall of runtests.jl parses cleanly and Runic formatting passes. This is a GPU suite that requires GPU hardware, so it was not run locally; CI will verify.

This PR should be ignored until reviewed by @ChrisRackauckas.

🤖 Generated with Claude Code

Convert the independent test units in test/runtests.jl that were still
plain `@testset "X" begin include(...) end` into `@safetestset` so each
runs in its own module (isolation + world-age safety), matching the
already-canonical units in this suite.

Converted: GPU Kernelized Non Stiff ODE Regression, GPU Kernelized Stiff
ODE Regression, Lower level API, and the four nested units inside the
"Callbacks" group (Non Stiff/Stiff ODE ContinuousCallback, SDE Regression,
SDE Convergence). The included files are already self-contained (own
`using` lines + shared utils.jl include), so no file edits were needed;
SafeTestsets injects `using Test` into each module so the bare `@test`
calls resolve.

Left "Distributed Multi-GPU" as a plain `@testset` (distributed
addprocs/@Everywhere does not play nicely with modules, as noted in the
file). Kept the "Callbacks" outer grouping `@testset` as a wrapper and the
GROUP-dispatch ladder unchanged. SafeTestsets is already a test dep.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ChrisRackauckas ChrisRackauckas marked this pull request as ready for review June 15, 2026 04:57
@ChrisRackauckas ChrisRackauckas merged commit 373f5b7 into SciML:master Jun 15, 2026
7 of 27 checks passed
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