Skip to content

Commit 7b6065e

Browse files
Test: Hide REPL internals in backtraces (#58732)
1 parent f855e4c commit 7b6065e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

stdlib/Test/src/Test.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,8 @@ struct Error <: Result
222222
end
223223
if test_type === :test_error || test_type === :nontest_error
224224
bt_str = try # try the latest world for this, since we might have eval'd new code for show
225-
Base.invokelatest(sprint, Base.show_exception_stack, bt; context=stdout)
225+
# Apply REPL backtrace scrubbing to hide REPL internals, similar to how REPL.jl handles it
226+
Base.invokelatest(sprint, Base.show_exception_stack, Base.scrub_repl_backtrace(bt); context=stdout)
226227
catch ex
227228
"#=ERROR showing exception stack=# " *
228229
try

0 commit comments

Comments
 (0)