Skip to content

Commit de6d62d

Browse files
authored
Advance deprecations (#2276)
Can't yet remove `is_informative_error()` because vctrs still registers methods for it.
1 parent 66b92a6 commit de6d62d

File tree

4 files changed

+3
-15
lines changed

4 files changed

+3
-15
lines changed

NEWS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# testthat (development version)
22

3+
* `expect_snapshot(binary)` is now fully deprecated; it was soft deprecated in v3.0.3.
4+
* `test_files(wrap)` has now been removed; it was deprecated in v3.0.0.
35
* Make `expect_lt()`, `expect_lte()`, `expect_gt()`, and `expect_gte()` work properly for non-numeric data (#2268)
46
* New `expect_disjoint()` to check for the absence of values (@stibu81, #1851).
57
* `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).

R/snapshot-file.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ expect_snapshot_file <- function(
137137

138138
is_text <- is_text_file(name)
139139
if (!is_missing(binary)) {
140-
lifecycle::deprecate_soft(
140+
lifecycle::deprecate_warn(
141141
"3.0.3",
142142
"expect_snapshot_file(binary = )",
143143
"expect_snapshot_file(compare = )"

R/test-files.R

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
#' ```
3737
#' Config/testthat/load-all: list(export_all = FALSE, helpers = FALSE)
3838
#' ```
39-
#' @param wrap DEPRECATED
4039
#' @return A list (invisibly) containing data about the test results.
4140
#' @inheritParams with_reporter
4241
#' @inheritParams source_file
@@ -50,7 +49,6 @@ test_dir <- function(
5049
load_helpers = TRUE,
5150
stop_on_failure = TRUE,
5251
stop_on_warning = FALSE,
53-
wrap = deprecated(),
5452
package = NULL,
5553
load_package = c("none", "installed", "source"),
5654
shuffle = FALSE
@@ -69,10 +67,6 @@ test_dir <- function(
6967
cli::cli_abort("No test files found.")
7068
}
7169

72-
if (!is_missing(wrap)) {
73-
lifecycle::deprecate_stop("3.0.0", "test_dir(wrap = )")
74-
}
75-
7670
want_parallel <- find_parallel(path, load_package, package)
7771

7872
if (is.null(reporter)) {
@@ -150,15 +144,11 @@ test_files <- function(
150144
stop_on_failure = FALSE,
151145
stop_on_warning = FALSE,
152146
desc = NULL,
153-
wrap = TRUE,
154147
load_package = c("none", "installed", "source"),
155148
parallel = FALSE,
156149
shuffle = FALSE,
157150
error_call = caller_env()
158151
) {
159-
if (!isTRUE(wrap)) {
160-
lifecycle::deprecate_stop("3.0.0", "test_dir(wrap = )")
161-
}
162152

163153
# Must keep these two blocks in sync
164154
if (parallel) {
@@ -202,7 +192,6 @@ test_files_serial <- function(
202192
stop_on_failure = FALSE,
203193
stop_on_warning = FALSE,
204194
desc = NULL,
205-
wrap = TRUE,
206195
load_package = c("none", "installed", "source"),
207196
shuffle = FALSE,
208197
error_call = caller_env()

man/test_dir.Rd

Lines changed: 0 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)