Skip to content

Commit 22591f9

Browse files
Drop unused force keyword from runtestsetup
1 parent 3f69586 commit 22591f9

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
@@ -942,8 +942,8 @@ function with_source_path(f, path)
942942
end
943943

944944
# Call `runtestsetup(ts, ...)` for each `ts::Testsetup` required by the given `TestItem`
945-
# Return setup_name => module_name pairs
946-
function runtestsetups(ti::TestItem, ctx::TestContext; logs::Symbol, force::Bool=false)
945+
# Return `Dict` mapping `setup_name::Symbol => module_name::Symbol`
946+
function runtestsetups(ti::TestItem, ctx::TestContext; logs::Symbol)
947947
# Initialse with the list of _requested_ setups, so that if it no setup by that name was
948948
# found when including files we return the setup name as the module name. Attempting to
949949
# import that name, like `using $setup`, will then throw an appropriate error.
@@ -959,16 +959,13 @@ end
959959
# name of the `Module` (i.e. returns a `Symbol`).
960960
# If the `TestSetup` has already been evaluated on this process and so is already in the
961961
# `TestContext`, simply returns the `Module` name.
962-
# Pass `force=true` to force the `TestSetup` to be re-evaluated, even if run before.
963-
function runtestsetup(ts::TestSetup, ctx::TestContext; logs::Symbol, force::Bool=false)
962+
function runtestsetup(ts::TestSetup, ctx::TestContext; logs::Symbol)
964963
mods = ctx.setups_evaled
965964
@lock mods.lock begin
966-
if !force
967-
mod = get(mods.modules, ts.name, nothing)
968-
if mod !== nothing
969-
# we've eval-ed this module before, so just return the module name
970-
return nameof(mod)
971-
end
965+
mod = get(mods.modules, ts.name, nothing)
966+
if mod !== nothing
967+
# we've eval-ed this module before, so just return the module name
968+
return nameof(mod)
972969
end
973970
# We haven't eval-ed this module before, so we need to eval it.
974971
# In case the setup fails to eval, we discard its logs -- we will attempt to eval

0 commit comments

Comments
 (0)