Skip to content

Commit 2040a86

Browse files
committed
fix wrong reported numbers when a testset fails
1 parent 2497492 commit 2040a86

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/ReTest.jl

+9-4
Original file line numberDiff line numberDiff line change
@@ -927,8 +927,10 @@ function retest(@nospecialize(args::ArgType...);
927927

928928
print_overall() =
929929
if module_summary(verbose, many)
930-
@assert endswith(module_ts.description, ':')
931-
module_ts.description = chop(module_ts.description, tail=1)
930+
# @assert endswith(module_ts.description, ':')
931+
if endswith(module_ts.description, ':')
932+
module_ts.description = chop(module_ts.description, tail=1)
933+
end
932934
clear_line()
933935
Testset.print_test_results(module_ts, format,
934936
bold=true, hasbroken=hasbroken,
@@ -959,7 +961,8 @@ function retest(@nospecialize(args::ArgType...);
959961
gotprinted = true
960962

961963
if rts === nothing
962-
errored || print_overall()
964+
errored && println() # to have empty line after reported error
965+
print_overall()
963966
finito = true
964967
return
965968
end
@@ -977,7 +980,9 @@ function retest(@nospecialize(args::ArgType...);
977980
)
978981
end
979982
if rts.anynonpass
980-
print_overall()
983+
# TODO: can we print_overall() here,
984+
# without having the wrong numbers?
985+
# print_overall()
981986
println()
982987
Testset.print_test_errors(rts)
983988
errored = true

0 commit comments

Comments
 (0)