From b759a5af98a079ec3fd21b7ed7fcdd9f72b91457 Mon Sep 17 00:00:00 2001 From: Nick Robinson Date: Tue, 12 Mar 2024 12:50:25 +0000 Subject: [PATCH] Try not using gensym for testsetup module names --- src/ReTestItems.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ReTestItems.jl b/src/ReTestItems.jl index a882b85c..9a48b1b0 100644 --- a/src/ReTestItems.jl +++ b/src/ReTestItems.jl @@ -845,7 +845,7 @@ function ensure_setup!(ctx::TestContext, setup::Symbol, setups::Vector{TestSetup # failed test item, we'd print the cumulative logs from all the previous attempts. isassigned(ts.logstore) && close(ts.logstore[]) ts.logstore[] = open(logpath(ts), "w") - mod_expr = :(module $(gensym(ts.name)) end) + mod_expr = :(module $(ts.name) end) # replace the module expr body with our @testsetup code mod_expr.args[3] = ts.code newmod = _redirect_logs(logs == :eager ? DEFAULT_STDOUT[] : ts.logstore[]) do @@ -956,7 +956,7 @@ function runtestitem( push!(body.args, Expr(:using, Expr(:., :Main, ts_mod))) # ts_mod is a gensym'd name so that setup modules don't clash # so we set a const alias inside our @testitem module to make things work - push!(body.args, :(const $setup = $ts_mod)) + # push!(body.args, :(const $setup = $ts_mod)) end @debugv 1 "Setup for test item $(repr(name)) done$(_on_worker())."