Skip to content

Commit

Permalink
test for no inlining of partial_self that passes when run via covr
Browse files Browse the repository at this point in the history
  • Loading branch information
mjskay committed Dec 30, 2023
1 parent a6a1868 commit b8244c2
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions tests/testthat/test.auto_partial.R
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,5 @@ test_that("functions without arguments work", {
test_that("functions inside the ggdist namespace do not inline partial_self", {
f = function(x) x + 1
environment(f) = asNamespace("ggdist")
expect_identical(body(auto_partial(f, name = "f")), quote({
if (missing(x))
return(partial_self("f"))
x + 1
}))
expect_match(deparse0(body(auto_partial(f, name = "f"))), 'partial_self("f")', fixed = TRUE)
})

0 comments on commit b8244c2

Please sign in to comment.