Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
Lilith Hafner authored and Lilith Hafner committed Oct 3, 2023
1 parent d3e2b46 commit eddd2c8
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions test/python/pycall.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,18 @@ function with_pycall_in_default_environment(f)
path = Pkg.project().path
Pkg.activate()
install = "PyCall" keys(Pkg.project().dependencies)
install && Pkg.add("PyCall")
if install
Pkg.add("PyCall")
end
Pkg.activate(path)
try
f()
finally
install && Pkg.rm("PyCall")
Pkg.activate(path)
if install
Pkg.activate()
Pkg.rm("PyCall")
Pkg.activate(path)
end
end
end

Expand Down

0 comments on commit eddd2c8

Please sign in to comment.