Skip to content

Commit 30fbfc6

Browse files
DilumAluthgedkarrasch
authored andcommitted
Test suite: activate a temp project if we need to install Aqua.jl during the test suite (#425)
1 parent 91b0aa5 commit 30fbfc6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/ambiguous.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
original_depot_path = copy(Base.DEPOT_PATH)
66
original_load_path = copy(Base.LOAD_PATH)
77
original_env = copy(ENV)
8+
original_project = Base.active_project()
89
###
910

1011
import Pkg
@@ -13,6 +14,7 @@ import Pkg
1314
if Base.find_package("Aqua") === nothing
1415
@debug "Installing Aqua.jl for SparseArrays.jl tests"
1516
iob = IOBuffer()
17+
Pkg.activate(; temp = true)
1618
try
1719
# TODO: make this version tie to compat in Project.toml
1820
# or do this another safer way
@@ -103,4 +105,6 @@ end
103105
for (k, v) in pairs(original_env)
104106
ENV[k] = v
105107
end
108+
109+
Base.set_active_project(original_project)
106110
###

0 commit comments

Comments
 (0)