Skip to content

Commit 76de57e

Browse files
committed
Polishing
1 parent 510e826 commit 76de57e

File tree

4 files changed

+9
-17
lines changed

4 files changed

+9
-17
lines changed

R/reporter-progress.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,9 +233,8 @@ ProgressReporter <- R6::R6Class(
233233

234234
# Separate from the progress bar
235235
self$cat_line()
236-
self$cat_line()
237236
stop_reporter(c(
238-
"Maximum number of failures exceeded; quitting at end of file.",
237+
"Maximum number of failures exceeded; quitting.",
239238
i = "Increase this number with (e.g.) {.run testthat::set_max_fails(Inf)}"
240239
))
241240
},
@@ -481,7 +480,9 @@ ParallelProgressReporter <- R6::R6Class(
481480
self$update(force = TRUE)
482481
}
483482
} else {
483+
self$update(force = TRUE)
484484
self$cat_line()
485+
self$rule()
485486

486487
issues <- unlist(
487488
map(self$files, \(x) x$issues$as_list()),
@@ -490,6 +491,7 @@ ParallelProgressReporter <- R6::R6Class(
490491
summary <- map_chr(issues, issue_summary)
491492
self$cat_tight(paste(summary, collapse = "\n\n"))
492493

494+
self$cat_line()
493495
self$report_full()
494496
}
495497
},

tests/testthat/_snaps/reporter-progress.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,8 @@
131131
`actual`: FALSE
132132
`expected`: TRUE
133133
--------------------------------------------------------------------------------
134-
Maximum number of failures exceeded; quitting at end of file.
134+
135+
Maximum number of failures exceeded; quitting.
135136
i Increase this number with (e.g.) `testthat::set_max_fails(Inf)`
136137

137138
# can fully suppress incremental updates
@@ -564,7 +565,7 @@
564565
v | F W S OK | Context
565566

566567
- [ FAIL 0 | WARN 0 | SKIP 0 | PASS 0 ] Starting up...
567-
x | 11 0 | reporters/fail-many
568+
\ [ FAIL 11 | WARN 0 | SKIP 0 | PASS 0 ] @ reporters/fail-many
568569
--------------------------------------------------------------------------------
569570
Failure ('reporters/fail-many.R:3:5'): Example
570571
FALSE (`actual`) is not equal to TRUE (`expected`).
@@ -631,8 +632,8 @@
631632

632633
`actual`: FALSE
633634
`expected`: TRUE
634-
--------------------------------------------------------------------------------
635-
Maximum number of failures exceeded; quitting at end of file.
635+
636+
Maximum number of failures exceeded; quitting.
636637
i Increase this number with (e.g.) `testthat::set_max_fails(Inf)`
637638

638639

tests/testthat/test-capture-output.R

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
test_that("fails", {
2-
for (i in 1:5) {
3-
test_that(paste0(i), fail())
4-
}
5-
})
6-
71
test_that("multiplication works", {
82
utf8 <- "M\u00e4chler"
93
latin1 <- "M\xe4chler"

tests/testthat/test-watcher.R

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
test_that("fails", {
2-
for (i in 1:5) {
3-
test_that(paste0(i), fail())
4-
}
5-
})
61
test_that("compare state works correctly", {
72
loc <- withr::local_tempfile(pattern = "watcher")
83
dir.create(loc)

0 commit comments

Comments
 (0)