Skip to contents

Computes the pass rate of each case of run_evals() and stops, listing them, when some fall below min. A rate per case, not overall: a case that always fails cannot hide among cases that pass.

Usage

assert_pass_rate(results, min = 0.8)

Arguments

results

Results of run_evals().

min

Lowest pass rate accepted for each case, between 0 and 1.

Value

results, invisibly.

Examples

results <- data.frame(
  question = "Show me my long runs in 2024.",
  run = 1:2,
  passed = c(
    TRUE,
    TRUE
  )
)
assert_pass_rate(
  results
)