Skip to content

Commit

Permalink
Update testdefs.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
DilumAluthge committed Sep 3, 2022
1 parent fd2ddb4 commit c0daaa5
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions test/testdefs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,26 @@ function runtests(name, path, isolate=true; seed=nothing)

Base.include(m, "$path.jl")

if Base.DEPOT_PATH != original_depot_path
@warn(
"The $(name) test set mutated Base.DEPOT_PATH and did not restore the original value",
original_depot_path,
Base.DEPOT_PATH,
testset_name = name,
testset_path = path,
)
end

if Base.LOAD_PATH != original_load_path
@warn(
"The $(name) test set mutated Base.LOAD_PATH and did not restore the original value",
original_load_path,
Base.LOAD_PATH,
testset_name = name,
testset_path = path,
)
end

# Restore the original `Base.DEPOT_PATH` and `Base.LOAD_PATH`
empty!(Base.DEPOT_PATH)
empty!(Base.LOAD_PATH)
Expand Down

0 comments on commit c0daaa5

Please sign in to comment.