Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions R/test-agent.R
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,17 @@ agentTestAnalysis <- function(name, logFile = NULL, includeAll = TRUE) {
#' and \code{error} (error message string, or NULL on success).
#' @keywords internal
runTestsQuietly <- function(testFun) {
# Fix cli.spinner: btw::local_reproducible_output() (called by btw_tool_run_r)

Copy link

Copilot AI Mar 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The explanatory comment is accidentally split by a blank line between lines 166 and 168, making it read as two separate comments. The sentence "btw::local_reproducible_output() (called by btw_tool_run_r)" is cut off at line 166, with the rest of the sentence starting on line 168. The blank line should be removed so the comment is a single continuous block.

Suggested change

Copilot uses AI. Check for mistakes.
# sets options(cli.spinner = FALSE). This is invalid — cli::get_spinner()
# expects NULL, a string, or a list. When testthat::LlmReporter$new() calls
# ProgressReporter$initialize() -> cli::get_spinner()$frames, it crashes with
# "$ operator is invalid for atomic vectors". Guard against non-string values.
oldSpinner <- getOption("cli.spinner")
if (!is.null(oldSpinner) && !is.character(oldSpinner) && !is.list(oldSpinner))
options(cli.spinner = "line")
on.exit(options(cli.spinner = oldSpinner), add = TRUE)

# We CANNOT muffle all warnings because testthat's expectation_warning
# inherits from warning — muffling them breaks the test framework's
# condition recording and causes hangs. Only muffle the specific
Expand Down
Loading