Skip to content

Commit 694e6c6

Browse files
hadleyjennybc
andauthored
Make test_file() and test_coverage_file() defunct (#2660)
* 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. * Refer to a version greater than current release * These are actually defunct * Add date * Fix topic name --------- Co-authored-by: Jenny Bryan <jenny.f.bryan@gmail.com>
1 parent d613fe6 commit 694e6c6

6 files changed

Lines changed: 44 additions & 44 deletions

File tree

NEWS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
* `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).
1212
* `release()` is deprecated in favour of `usethis::use_release_issue()`.
1313
* `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).
14+
* `test_file()` and `test_coverage_file()` are now defunct. These were deprecated in devtools 2.4.0 (2021-04-07) in favour of `test_active_file()` and `test_coverage_active_file()`. Removing `test_file()` eliminates the conflict with `testthat::test_file()`.
1415

1516
# devtools 2.4.6
1617

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+
#' Defunct functions
193+
#'
194+
#' These functions are defunct and will be removed in a future version of
195+
#' devtools.
196+
#' @name devtools-defunct
197+
#' @keywords internal
198+
NULL
199+
200+
#' @rdname devtools-defunct
201+
#' @export
202+
test_file <- function(file = find_active_file(), ...) {
203+
lifecycle::deprecate_stop("2.5.0", "test_file()", "test_active_file()")
204+
}
205+
206+
#' @rdname devtools-defunct
207+
#' @export
208+
test_coverage_file <- function(file = find_active_file(), ...) {
209+
lifecycle::deprecate_stop(
210+
"2.5.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
@@ -1,14 +1,6 @@
11
#' @import fs
22
NULL
33

4-
#' Deprecated functions
5-
#'
6-
#' These functions are Deprecated in this release of devtools, they will be
7-
#' marked as Defunct and removed in a future version.
8-
#' @name devtools-deprecated
9-
#' @keywords internal
10-
NULL
11-
124
devtools_default_options <- list(
135
devtools.path = "~/R-dev",
146
devtools.install.args = "",

_pkgdown.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ reference:
5757
- release
5858
- show_news
5959
- wd
60-
- devtools-deprecated
60+
- devtools-defunct
6161

6262
news:
6363
releases:

man/devtools-defunct.Rd

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

man/devtools-deprecated.Rd

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)