Skip to content

Commit d782502

Browse files
Drop unused force keyword from runtestsetup
1 parent 426b4af commit d782502

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

src/ReTestItems.jl

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -822,8 +822,8 @@ function with_source_path(f, path)
822822
end
823823

824824
# Call `runtestsetup(ts, ...)` for each `ts::Testsetup` required by the given `TestItem`
825-
# Return setup_name => module_name pairs
826-
function runtestsetups(ti::TestItem, ctx::TestContext; logs::Symbol, force::Bool=false)
825+
# Return `Dict` mapping `setup_name::Symbol => module_name::Symbol`
826+
function runtestsetups(ti::TestItem, ctx::TestContext; logs::Symbol)
827827
# Initialse with the list of _requested_ setups, so that if it no setup by that name was
828828
# found when including files we return the setup name as the module name. Attempting to
829829
# import that name, like `using $setup`, will then throw an appropriate error.
@@ -839,16 +839,13 @@ end
839839
# name of the `Module` (i.e. returns a `Symbol`).
840840
# If the `TestSetup` has already been evaluated on this process and so is already in the
841841
# `TestContext`, simply returns the `Module` name.
842-
# Pass `force=true` to force the `TestSetup` to be re-evaluated, even if run before.
843-
function runtestsetup(ts::TestSetup, ctx::TestContext; logs::Symbol, force::Bool=false)
842+
function runtestsetup(ts::TestSetup, ctx::TestContext; logs::Symbol)
844843
mods = ctx.setups_evaled
845844
@lock mods.lock begin
846-
if !force
847-
mod = get(mods.modules, ts.name, nothing)
848-
if mod !== nothing
849-
# we've eval-ed this module before, so just return the module name
850-
return nameof(mod)
851-
end
845+
mod = get(mods.modules, ts.name, nothing)
846+
if mod !== nothing
847+
# we've eval-ed this module before, so just return the module name
848+
return nameof(mod)
852849
end
853850
# We haven't eval-ed this module before, so we need to eval it.
854851
# In case the setup fails to eval, we discard its logs -- we will attempt to eval

0 commit comments

Comments
 (0)