Skip to content

Commit

Permalink
Bump required R version to R 4.0.0
Browse files Browse the repository at this point in the history
(Since other tidyverse/r-lib packages will requiring it; this just makes the dependency explicit for covr)
  • Loading branch information
hadley committed Nov 7, 2024
1 parent c0c88f1 commit dfc43ad
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 17 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Description: Track and report code coverage for your package and (optionally)
URL: https://covr.r-lib.org, https://github.com/r-lib/covr
BugReports: https://github.com/r-lib/covr/issues
Depends:
R (>= 3.1.0),
R (>= 4.0.0),
methods
Imports:
digest,
Expand Down
4 changes: 0 additions & 4 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -200,10 +200,6 @@ per_line <- function(coverage) {
class = "line_coverages")
}

if (getRversion() < "3.2.0") {
isNamespaceLoaded <- function(x) x %in% loadedNamespaces()
}

is_windows <- function() {
.Platform$OS.type == "windows"
}
Expand Down
12 changes: 0 additions & 12 deletions tests/testthat/test-utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,6 @@ test_that("it works as expected", {
})

context("get_source_filename")
test_that("it works", {
# R 4.0.0 changes this behavior so `getSrcFilename()` will actually return
# "test-utils.R"

skip_if(getRversion() >= "4.0.0")

x <- eval(bquote(function() 1))

expect_identical(getSrcFilename(x), character())
expect_identical(get_source_filename(x), "")
})

test_that("per_line removes blank lines and lines with only punctuation (#387)", {
skip_on_cran()

Expand Down

0 comments on commit dfc43ad

Please sign in to comment.