From 0c27752b1d50edbda5734f1f4dc9b4a288c2871d Mon Sep 17 00:00:00 2001 From: Hendrik Ranocha Date: Tue, 12 Sep 2023 16:16:03 +0200 Subject: [PATCH] WIP: trying to make Literate.jl testsets safeer --- docs/literate/make.jl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/literate/make.jl b/docs/literate/make.jl index b620f85c975..f6ee8e78c97 100644 --- a/docs/literate/make.jl +++ b/docs/literate/make.jl @@ -56,7 +56,12 @@ function create_tutorials(files) @testset "$(filename[j][2][2])" begin include(joinpath(repo_src, filename[j][2][1], filename[j][2][2])) end end else # Single files - @testset "$title" begin include(joinpath(repo_src, filename)) end + mod = gensym(title) + @testset "$title" begin + @eval module $mod + include(joinpath(repo_src, filename)) + end + end end end end