Commit 1f63884
Canonicalize tests to @safetestset for module isolation
Wrap each independent top-level test unit in `@safetestset` so it runs in its
own module, matching the canonical OrdinaryDiffEq structure (per-unit isolation
+ world-age safety). The GROUP dispatch ladder (All/Core/nopre), the nopre
activated-env path, and all assertions are unchanged.
Units converted:
- runtests.jl: `@testset "FunctionWrappersWrappers.jl" begin include("basictests.jl") end`
-> `@safetestset ... begin include("basictests.jl") end`. basictests.jl
already carries its own `using FunctionWrappersWrappers` / `using Test`, and
its inner grouping `@testset`s stay plain (the file-level @safetestset already
isolates the unit as one module).
- runtests.jl: "BigFloat support" and "UnionAll return types" -> @safetestset,
each with self-contained `using FunctionWrappersWrappers` / `using Test`.
- nopre/jet_tests.jl: "JET static analysis" -> @safetestset. Because the body
uses the `@test_opt` package macro (which must be imported before the body is
macroexpanded), the body was extracted to nopre/jet_tests_impl.jl (top-level
`using JET: @test_opt` runs before any `@test_opt` is parsed) and the
@safetestset just does `include("jet_tests_impl.jl")` — the canonical
OrdinaryDiffEq shape. Inline would hit `UndefVarError: @test_opt`.
Add SafeTestsets to test deps: main Project.toml [extras]/[targets].test/[compat]
and nopre/Project.toml [deps] (the nopre env is activated + instantiated at run
time, so instantiate resolves SafeTestsets without a pre-baked Manifest entry).
Verified locally on Julia 1.11: GROUP=All passes (21 + 5 + 2) and GROUP=nopre
passes (7 + 5 + 2). Runic-clean.
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent f45aed9 commit 1f63884
5 files changed
Lines changed: 45 additions & 32 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
22 | | - | |
| 24 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
| 1 | + | |
4 | 2 | | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
| 3 | + | |
| 4 | + | |
30 | 5 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
6 | | - | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
18 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
19 | 23 | | |
20 | 24 | | |
21 | 25 | | |
| |||
36 | 40 | | |
37 | 41 | | |
38 | 42 | | |
39 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
40 | 47 | | |
41 | 48 | | |
42 | 49 | | |
| |||
0 commit comments