Skip to content

Commit ef12495

Browse files
authored
fix on test/signatures, allowing it to run on its own (#78)
Now `using TestEnv; TestEnv.activate(); include("test/signatures.jl")` works.
1 parent 14d01cb commit ef12495

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

test/signatures.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -411,12 +411,13 @@ bodymethtest5(x, y=Dict(1=>2)) = 5
411411

412412
# https://github.com/timholy/Revise.jl/issues/550
413413
using Pkg
414+
oldenv = Pkg.project().path
414415
try
415416
# we test with the old version of CBinding, let's do it in an isolated environment
416-
Pkg.activate(; temp=true)
417+
Pkg.activate(; temp=true, io=devnull)
417418

418419
@info "Adding CBinding to the environment for test purposes"
419-
Pkg.add(; name="CBinding", version="0.9.4") # `@cstruct` isn't defined for v1.0 and above
420+
Pkg.add(; name="CBinding", version="0.9.4", io=devnull) # `@cstruct` isn't defined for v1.0 and above
420421

421422
m = Module()
422423
Core.eval(m, :(using CBinding))
@@ -431,7 +432,7 @@ bodymethtest5(x, y=Dict(1=>2)) = 5
431432
pc = methoddefs!(signatures, frame; define=false)
432433
@test !isempty(signatures) # really we just need to know that `methoddefs!` completed without getting stuck
433434
finally
434-
Pkg.activate() # back to the original environment
435+
Pkg.activate(oldenv; io=devnull) # back to the original environment
435436
end
436437
end
437438

0 commit comments

Comments
 (0)