Skip to content

Commit

Permalink
tidy up Base.active_project_callbacks earlier to avoid error log
Browse files Browse the repository at this point in the history
  • Loading branch information
IanButterworth committed Mar 4, 2022
1 parent b07fe00 commit 8e262ed
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/loading.jl
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ append!(empty!(DEPOT_PATH), [mktempdir(), joinpath(@__DIR__, "depot")])
@test watcher_counter[] == 0
@test_logs (:error, r"active project callback .* failed") Base.set_active_project(nothing)
@test watcher_counter[] == 1
pop!(Base.active_project_callbacks)

@test load_path() == [joinpath(@__DIR__, "project", "Project.toml")]

Expand Down Expand Up @@ -732,7 +733,7 @@ end

append!(empty!(LOAD_PATH), saved_load_path)
append!(empty!(DEPOT_PATH), saved_depot_path)
for _ = 1:2 pop!(Base.active_project_callbacks) end
pop!(Base.active_project_callbacks)
Base.set_active_project(saved_active_project)
@test watcher_counter[] == 3

Expand Down

0 comments on commit 8e262ed

Please sign in to comment.