Skip to content

Commit 45a6a3f

Browse files
committed
Make test_file() and test_coverage_file() defunct
We're technically skipping a step here, but I think it should be ok because these functions are primarily called via keyboard shortcuts, which have switched to the newer forms for some time.
1 parent 710ea07 commit 45a6a3f

4 files changed

Lines changed: 29 additions & 29 deletions

File tree

NEWS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* `load_all()` now errors if called recursively, i.e. if you accidentally include a `load_all()` call in one of your R source files (#2617).
1010
* `release()` is deprecated in favour of `usethis::use_release_issue()`.
1111
* `show_news()` now looks for NEWS files in the same locations as `utils::news()`: `inst/NEWS.Rd`, `NEWS.md`, `NEWS`, and `inst/NEWS` (@arcresu, #2499).
12+
* `test_file()` and `test_coverage_file()` are now defunct. These were deprecated in devtools 2.4.0 in favour of `test_active_file()` and `test_coverage_active_file()`. Removing `test_file()` eliminates the conflict with `testthat::test_file()`.
1213

1314
# devtools 2.4.6
1415

R/test.R

Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,6 @@ test <- function(
5454
)
5555
}
5656

57-
#' @rdname devtools-deprecated
58-
#' @export
59-
test_file <- function(file = find_active_file(), ...) {
60-
lifecycle::deprecate_soft("2.4.0", "test_file()", "test_active_file()")
61-
test_active_file(file, ...)
62-
}
63-
6457
#' @export
6558
#' @rdname test
6659
test_active_file <- function(file = find_active_file(), ...) {
@@ -115,17 +108,6 @@ test_coverage <- function(pkg = ".", show_report = interactive(), ...) {
115108
invisible(coverage)
116109
}
117110

118-
#' @rdname devtools-deprecated
119-
#' @export
120-
test_coverage_file <- function(file = find_active_file(), ...) {
121-
lifecycle::deprecate_soft(
122-
"2.4.0",
123-
"test_coverage()",
124-
"test_coverage_active_file()"
125-
)
126-
test_coverage_active_file(file, ...)
127-
}
128-
129111
#' @rdname test
130112
#' @export
131113
test_coverage_active_file <- function(
@@ -205,3 +187,28 @@ uses_testthat <- function(pkg = ".") {
205187

206188
any(dir_exists(paths))
207189
}
190+
191+
192+
#' Deprecated functions
193+
#'
194+
#' These functions are Deprecated in this release of devtools, they will be
195+
#' marked as Defunct and removed in a future version.
196+
#' @name devtools-deprecated
197+
#' @keywords internal
198+
NULL
199+
200+
#' @rdname devtools-deprecated
201+
#' @export
202+
test_file <- function(file = find_active_file(), ...) {
203+
lifecycle::deprecate_stop("2.4.0", "test_file()", "test_active_file()")
204+
}
205+
206+
#' @rdname devtools-deprecated
207+
#' @export
208+
test_coverage_file <- function(file = find_active_file(), ...) {
209+
lifecycle::deprecate_stop(
210+
"2.4.0",
211+
"test_coverage_file()",
212+
"test_coverage_active_file()"
213+
)
214+
}

R/zzz.R

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,6 @@
55
#' @import fs
66
NULL
77

8-
#' Deprecated functions
9-
#'
10-
#' These functions are Deprecated in this release of devtools, they will be
11-
#' marked as Defunct and removed in a future version.
12-
#' @name devtools-deprecated
13-
#' @keywords internal
14-
NULL
15-
168
devtools_default_options <- list(
179
devtools.path = "~/R-dev",
1810
devtools.install.args = "",

man/devtools-deprecated.Rd

Lines changed: 3 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)