Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# testthat (development version)

* `expect_snapshot(binary)` is now fully deprecated; it was soft deprecated in v3.0.3.
* `test_files(wrap)` has now been removed; it was deprecated in v3.0.0.
* Make `expect_lt()`, `expect_lte()`, `expect_gt()`, and `expect_gte()` work properly for non-numeric data (#2268)
* New `expect_disjoint()` to check for the absence of values (@stibu81, #1851).
* `expect_all_equal()`, `expect_all_true()`, and `expect_all_false()` are a new family of expectations that checks that every element of a vector has the same value. Compared to using `expect_true(all(...))` they give better failure messages (#1836, #2235).
Expand Down
2 changes: 1 addition & 1 deletion R/snapshot-file.R
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ expect_snapshot_file <- function(

is_text <- is_text_file(name)
if (!is_missing(binary)) {
lifecycle::deprecate_soft(
lifecycle::deprecate_warn(
"3.0.3",
"expect_snapshot_file(binary = )",
"expect_snapshot_file(compare = )"
Expand Down
11 changes: 0 additions & 11 deletions R/test-files.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
#' ```
#' Config/testthat/load-all: list(export_all = FALSE, helpers = FALSE)
#' ```
#' @param wrap DEPRECATED
#' @return A list (invisibly) containing data about the test results.
#' @inheritParams with_reporter
#' @inheritParams source_file
Expand All @@ -50,7 +49,6 @@ test_dir <- function(
load_helpers = TRUE,
stop_on_failure = TRUE,
stop_on_warning = FALSE,
wrap = deprecated(),
package = NULL,
load_package = c("none", "installed", "source"),
shuffle = FALSE
Expand All @@ -69,10 +67,6 @@ test_dir <- function(
cli::cli_abort("No test files found.")
}

if (!is_missing(wrap)) {
lifecycle::deprecate_stop("3.0.0", "test_dir(wrap = )")
}

want_parallel <- find_parallel(path, load_package, package)

if (is.null(reporter)) {
Expand Down Expand Up @@ -150,15 +144,11 @@ test_files <- function(
stop_on_failure = FALSE,
stop_on_warning = FALSE,
desc = NULL,
wrap = TRUE,
load_package = c("none", "installed", "source"),
parallel = FALSE,
shuffle = FALSE,
error_call = caller_env()
) {
if (!isTRUE(wrap)) {
lifecycle::deprecate_stop("3.0.0", "test_dir(wrap = )")
}

# Must keep these two blocks in sync
if (parallel) {
Expand Down Expand Up @@ -202,7 +192,6 @@ test_files_serial <- function(
stop_on_failure = FALSE,
stop_on_warning = FALSE,
desc = NULL,
wrap = TRUE,
load_package = c("none", "installed", "source"),
shuffle = FALSE,
error_call = caller_env()
Expand Down
3 changes: 0 additions & 3 deletions man/test_dir.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.