diff --git a/templates/test/test/runtests.jl b/templates/test/test/runtests.jl index 68eafb8..9a5999a 100644 --- a/templates/test/test/runtests.jl +++ b/templates/test/test/runtests.jl @@ -18,19 +18,25 @@ const GROUP = uppercase( for testgroup in filter(isdir, readdir(@__DIR__)) if GROUP == "ALL" || GROUP == uppercase(testgroup) for file in readdir(joinpath(@__DIR__, testgroup); join=true) - @eval :(@safetestset($file, include(file))) + @eval @safetestset $file begin + include($file) + end end end end # single files in top folder for file in filter(isfile, readdir(@__DIR__)) - @eval :(@safetestset($file, include(file))) + @eval @safetestset $file begin + include($file) + end end # test examples examplepath = joinpath(@__DIR__, "..", "examples") for file in filter(endswith(".jl"), readdir(examplepath; join=true)) - @eval :(@safetestset($file, @suppress include(file))) + @eval @safetestset $file begin + @suppress include($file) + end end end diff --git a/test/basics/test_basics.jl b/test/basics/test_basics.jl index 9e6f46c..036b7b2 100644 --- a/test/basics/test_basics.jl +++ b/test/basics/test_basics.jl @@ -1,4 +1,3 @@ -@eval module $(gensym()) using ITensorPkgSkeleton: ITensorPkgSkeleton using Test: @test, @testset @@ -43,4 +42,3 @@ using Test: @test, @testset end end end -end diff --git a/test/runtests.jl b/test/runtests.jl index 68eafb8..9a5999a 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -18,19 +18,25 @@ const GROUP = uppercase( for testgroup in filter(isdir, readdir(@__DIR__)) if GROUP == "ALL" || GROUP == uppercase(testgroup) for file in readdir(joinpath(@__DIR__, testgroup); join=true) - @eval :(@safetestset($file, include(file))) + @eval @safetestset $file begin + include($file) + end end end end # single files in top folder for file in filter(isfile, readdir(@__DIR__)) - @eval :(@safetestset($file, include(file))) + @eval @safetestset $file begin + include($file) + end end # test examples examplepath = joinpath(@__DIR__, "..", "examples") for file in filter(endswith(".jl"), readdir(examplepath; join=true)) - @eval :(@safetestset($file, @suppress include(file))) + @eval @safetestset $file begin + @suppress include($file) + end end end