Skip to content

Commit

Permalink
fix wrong reported numbers when a testset fails
Browse files Browse the repository at this point in the history
  • Loading branch information
rfourquet committed Jul 28, 2021
1 parent 2497492 commit 2040a86
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/ReTest.jl
Original file line number Diff line number Diff line change
Expand Up @@ -927,8 +927,10 @@ function retest(@nospecialize(args::ArgType...);

print_overall() =
if module_summary(verbose, many)
@assert endswith(module_ts.description, ':')
module_ts.description = chop(module_ts.description, tail=1)
# @assert endswith(module_ts.description, ':')
if endswith(module_ts.description, ':')
module_ts.description = chop(module_ts.description, tail=1)
end
clear_line()
Testset.print_test_results(module_ts, format,
bold=true, hasbroken=hasbroken,
Expand Down Expand Up @@ -959,7 +961,8 @@ function retest(@nospecialize(args::ArgType...);
gotprinted = true

if rts === nothing
errored || print_overall()
errored && println() # to have empty line after reported error
print_overall()
finito = true
return
end
Expand All @@ -977,7 +980,9 @@ function retest(@nospecialize(args::ArgType...);
)
end
if rts.anynonpass
print_overall()
# TODO: can we print_overall() here,
# without having the wrong numbers?
# print_overall()
println()
Testset.print_test_errors(rts)
errored = true
Expand Down

0 comments on commit 2040a86

Please sign in to comment.