@@ -2,33 +2,28 @@ import Pkg
22
33using Test, MLJModels, MLJTransforms
44
5- @testset " metadata" begin
6- @testset " metadata.jl" begin
7- @test include (" metadata.jl" )
8- end
9- @testset " model search" begin
10- @test include (" model_search.jl" )
11- end
12- @testset " loading model code" begin
13- @test include (" loading.jl" )
14- end
15- end
16-
17- @testset " built-in models" begin
18- @testset " Constant.jl" begin
19- @test include (" builtins/Constant.jl" )
20- end
21- @testset " ThresholdPredictors" begin
22- @test include (" builtins/ThresholdPredictors.jl" )
23- end
24- end
5+ test_files = [
6+ " metadata.jl" ,
7+ " model_search.jl" ,
8+ " loading.jl" ,
9+ joinpath (" builtins" , " Constant.jl" ),
10+ joinpath (" builtins" , " ThresholdPredictors.jl" ),
11+ ]
2512
2613if parse (Bool, get (ENV , " MLJ_TEST_REGISTRY" , " false" ))
27- @testset " registry" begin
28- @test include (" registry.jl" )
29- end
14+ push! (test_files, " registry.jl" )
3015else
3116 @info " Test of the MLJ Registry is being skipped. Set environment variable " *
3217 " MLJ_TEST_REGISTRY = \" true\" to include them.\n " *
3318 " The Registry test takes about ten minutes. "
3419end
20+
21+ files = isempty (ARGS ) ? test_files : ARGS
22+
23+ for file in files
24+ quote
25+ @testset $ file begin
26+ include ($ file)
27+ end
28+ end |> eval
29+ end
0 commit comments