We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am having problems with S3 and development covr (89029d4). CRAN covr appears unaffected.
covr
# Example file with S3: source <- quote({ mtd <- function(x, ...) { UseMethod("mtd") } mtd.cls <- function(x, ...) { x[[1]] } }) # A test: test <- quote({ library(testthat) test_that("", { x <- structure(list("x"), class = "cls") expect_equal(mtd(x), "x") }) }) # The test passes. eval(source) eval(test) # The same test fails with https://github.com/r-lib/covr/commit/89029d4670c09a106bbadfb384eec8b7ed42e885. # Passes with CRAN covr. writeLines(deparse(source), "source.R") writeLines(deparse(test), "test.R") library(covr) file_coverage("source.R", "test.R") #> Error: Test failed: '' #> * 'UseMethod' used in an inappropriate fashion #> 1: expect_equal(mtd(x), "x") at test.R:5 #> 2: quasi_label(enquo(object), label, arg = "object") #> 3: eval_bare(get_expr(quo), get_env(quo)) #> 4: mtd(x) #> 5: identity({ #> covr:::count("source.R:3:9:3:24:9:24:3:3") #> UseMethod("mtd") #> }) at source.R:3
Created on 2019-08-08 by the reprex package (v0.3.0)
The text was updated successfully, but these errors were encountered:
8a51590
Thanks @jimhester!
Sorry, something went wrong.
No branches or pull requests
I am having problems with S3 and development
covr
(89029d4). CRANcovr
appears unaffected.Created on 2019-08-08 by the reprex package (v0.3.0)
The text was updated successfully, but these errors were encountered: