Skip to content

Commit

Permalink
Actually fix syntax?
Browse files Browse the repository at this point in the history
  • Loading branch information
lkdvos committed Dec 4, 2024
1 parent 79255d6 commit 6cd80e4
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
12 changes: 9 additions & 3 deletions templates/test/test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 0 additions & 2 deletions test/basics/test_basics.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@eval module $(gensym())
using ITensorPkgSkeleton: ITensorPkgSkeleton
using Test: @test, @testset

Expand Down Expand Up @@ -43,4 +42,3 @@ using Test: @test, @testset
end
end
end
end
12 changes: 9 additions & 3 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 6cd80e4

Please sign in to comment.