tests/testthat/test-util_queue_summary.R

test_that("fails with invalid input", {
  data.frame(dummy = "dummy") |>
    util_queue_summary() |>
    expect_error()
})


test_that("Summary tibble is created successfully", {
  skip_if_no_quarto()
  skip_if_no_python()
  skip_on_cran()

  q <- whirl_queue$new(n_workers = 2)

  test_script(c("success.R", "py_success.py")) |>
    q$run()

  q$queue |>
    util_queue_summary() |>
    expect_s3_class("tbl_df") |>
    expect_named(
      c("Tag", "Directory", "Filename", "Status", "Hyperlink", "Information")
    ) |>
    nrow() |>
    expect_equal(2)
})

Try the whirl package in your browser

Any scripts or data that you put into this service are public.

whirl documentation built on Oct. 25, 2026, 9:06 a.m.