diff --git a/stdlib/Test/src/Test.jl b/stdlib/Test/src/Test.jl index 18082aa503857..429b59afba9e3 100644 --- a/stdlib/Test/src/Test.jl +++ b/stdlib/Test/src/Test.jl @@ -53,7 +53,7 @@ function scrub_backtrace(bt) if do_test_ind !== nothing && length(bt) > do_test_ind bt = bt[do_test_ind + 1:end] end - name_ind = findfirst(ip -> ip_has_file_and_func(ip, @__FILE__, (Symbol("macro expansion"),)), bt) + name_ind = findfirst(ip -> ip_has_file_and_func(ip, @__FILE__, (Symbol("macro expansion"), Symbol("top-level scope"))), bt) if name_ind !== nothing && length(bt) != 0 bt = bt[1:name_ind] end