Skip to content

Commit 37f93c9

Browse files
committed
Restore method lookup callback for future tests
1 parent 3df13a7 commit 37f93c9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

test/runtests.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ isdefined(Main, :Revise) ? includet("script.jl") : include("script.jl")
6868
m = first(methods(replfunc))
6969
@test whereis(m) == ("REPL[1]", 1)
7070
# Test with broken lookup
71+
oldlookup = CodeTracking.method_lookup_callback[]
7172
CodeTracking.method_lookup_callback[] = m -> error("oops")
7273
@test whereis(m) == ("REPL[1]", 1)
7374
# Test with definition(String, m)
@@ -81,6 +82,7 @@ isdefined(Main, :Revise) ? includet("script.jl") : include("script.jl")
8182
@test definition(String, first(methods(f))) == (fstr, 1)
8283
pop!(hp.history)
8384
end
85+
CodeTracking.method_lookup_callback[] = oldlookup
8486

8587
m = first(methods(Test.eval))
8688
@test occursin(Sys.STDLIB, whereis(m)[1])

0 commit comments

Comments
 (0)