Skip to content

Commit efe2dfc

Browse files
Use SciMLTesting v1.0.0 (run_tests harness)
Replace the hand-written GROUP-dispatch in test/runtests.jl with a single SciMLTesting.run_tests call. Behavior-equivalent refactor: - Core (All||Core): the POD / utils / DEIM safetestsets run via the `core` thunk. - QA: the Quality Assurance / Explicit Imports / JET Static Analysis safetestsets run via the `qa` body, which declares the test/qa sub-env. The `qa` kwarg runs under both "All" and "QA", matching the original `GROUP=="All" || GROUP=="QA"`. activate_group_env(test/qa) develops the repo root + instantiates, equivalent to the old Pkg.activate/develop/instantiate. test/Project.toml: add SciMLTesting (1); drop Pkg (only used by the old harness; no other test file uses Pkg.). SciMLTesting NOT added to test/qa (stays loaded). Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent f4ea1a7 commit efe2dfc

2 files changed

Lines changed: 27 additions & 32 deletions

File tree

test/Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
[deps]
22
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
33
MethodOfLines = "94925ecb-adb7-4558-8ed8-f975c56a0bf4"
4-
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
54
ModelingToolkit = "961ee093-0014-501f-94e3-6117800e7a78"
65
OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
76
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
7+
SciMLTesting = "09d9d899-5365-40a9-917a-5f67fddea283"
88
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
99

1010
[compat]
1111
LinearAlgebra = "1"
1212
MethodOfLines = "0.11"
13-
Pkg = "1.10"
1413
ModelingToolkit = "11"
1514
OrdinaryDiffEq = "7"
1615
SafeTestsets = "0.1"
16+
SciMLTesting = "1"

test/runtests.jl

Lines changed: 25 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,27 @@
11
using SafeTestsets
2+
using SciMLTesting
23

3-
const GROUP = get(ENV, "GROUP", "All")
4-
5-
if GROUP == "All" || GROUP == "Core"
6-
@safetestset "POD" begin
7-
include("DataReduction.jl")
8-
end
9-
@safetestset "utils" begin
10-
include("utils.jl")
11-
end
12-
@safetestset "DEIM" begin
13-
include("deim.jl")
14-
end
15-
end
16-
17-
if GROUP == "All" || GROUP == "QA"
18-
using Pkg
19-
Pkg.activate(@__DIR__() * "/qa")
20-
Pkg.develop(path = dirname(@__DIR__))
21-
Pkg.instantiate()
22-
23-
@safetestset "Quality Assurance" begin
24-
include("qa/qa_tests.jl")
25-
end
26-
@safetestset "Explicit Imports" begin
27-
include("qa/explicit_imports_tests.jl")
28-
end
29-
@safetestset "JET Static Analysis" begin
30-
include("qa/jet_tests.jl")
31-
end
32-
end
4+
run_tests(;
5+
core = () -> begin
6+
@safetestset "POD" begin
7+
include("DataReduction.jl")
8+
end
9+
@safetestset "utils" begin
10+
include("utils.jl")
11+
end
12+
@safetestset "DEIM" begin
13+
include("deim.jl")
14+
end
15+
end,
16+
qa = (; env = joinpath(@__DIR__, "qa"), body = () -> begin
17+
@safetestset "Quality Assurance" begin
18+
include("qa/qa_tests.jl")
19+
end
20+
@safetestset "Explicit Imports" begin
21+
include("qa/explicit_imports_tests.jl")
22+
end
23+
@safetestset "JET Static Analysis" begin
24+
include("qa/jet_tests.jl")
25+
end
26+
end),
27+
)

0 commit comments

Comments
 (0)