Skip to content

Commit 8cf6158

Browse files
IanButterworthKristofferC
authored andcommitted
Test: Hide REPL internals in backtraces (#58732)
(cherry picked from commit 7b6065e)
1 parent 6f3d23e commit 8cf6158

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

0 commit comments

Comments
 (0)