Skip to content

Commit 9a82567

Browse files
IanButterworthKristofferC
authored andcommitted
Test: Hide REPL internals in backtraces (#58732)
(cherry picked from commit 7b6065e)
1 parent aba3834 commit 9a82567

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
@@ -230,7 +230,8 @@ struct Error <: Result
230230
end
231231
if test_type === :test_error || test_type === :nontest_error
232232
bt_str = try # try the latest world for this, since we might have eval'd new code for show
233-
Base.invokelatest(sprint, Base.show_exception_stack, bt; context=stdout)
233+
# Apply REPL backtrace scrubbing to hide REPL internals, similar to how REPL.jl handles it
234+
Base.invokelatest(sprint, Base.show_exception_stack, Base.scrub_repl_backtrace(bt); context=stdout)
234235
catch ex
235236
"#=ERROR showing exception stack=# " *
236237
try

0 commit comments

Comments
 (0)