Skip to content

Commit 37d1196

Browse files
Canonicalize test units to @safetestset
Convert the independent top-level test units in test/runtests.jl from plain @testset to @safetestset so each unit runs in its own module (isolation between tests + world-age safety), matching the canonical SciML structure. Each included file is self-contained (carries its own using/import block). test/test.jl previously relied on the explicit `using SymbolicAnalysis: propagate_curvature, propagate_sign, getcurvature, getsign` at the top of runtests.jl leaking into Main; those names are not exported, so the import is now added directly to test.jl to keep it self-contained under @safetestset. Bump test SafeTestsets compat to "0.1, 1" to match the canonical layout. No test logic, assertions, GROUP dispatch, or which-tests-run changed. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 369ec5f commit 37d1196

3 files changed

Lines changed: 7 additions & 6 deletions

File tree

test/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ Optimization = "5.6.1"
2222
OptimizationBase = "5.1.3"
2323
OptimizationManopt = "1.3.2"
2424
PDMats = "0.11.37"
25-
SafeTestsets = "0.1.0"
25+
SafeTestsets = "0.1, 1"
2626
Symbolics = "7.25.0"
2727
Zygote = "0.7.10"

test/runtests.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,26 @@ using SymbolicAnalysis:
88

99
using SafeTestsets, Test
1010

11-
@testset "DCP" begin
11+
@safetestset "DCP" begin
1212
include("test.jl")
1313
end
1414

15-
@testset "DGCP - SPD Manifold" begin
15+
@safetestset "DGCP - SPD Manifold" begin
1616
include("dgp.jl")
1717
end
1818

19-
@testset "DGCP - Lorentz Manifold" begin
19+
@safetestset "DGCP - Lorentz Manifold" begin
2020
include("lorentz.jl")
2121
end
2222

23-
@testset "Interface Compatibility" begin
23+
@safetestset "Interface Compatibility" begin
2424
include("interface_tests.jl")
2525
end
2626

2727
# AllocCheck tests - run separately to avoid precompilation overhead
2828
# These tests verify that key operations have minimal allocations
2929
if get(ENV, "SYMBOLICANALYSIS_TEST_ALLOC", "true") == "true"
30-
@testset "Allocation Tests" begin
30+
@safetestset "Allocation Tests" begin
3131
include("alloc_tests.jl")
3232
end
3333
end

test/test.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using SymbolicAnalysis
2+
using SymbolicAnalysis: propagate_curvature, propagate_sign, getcurvature, getsign
23
using Symbolics, SymbolicAnalysis.LogExpFunctions
34
using Symbolics: unwrap
45
using LinearAlgebra, Test

0 commit comments

Comments
 (0)