Skip to content

Commit e086c9c

Browse files
author
Florence Bockting
committed
tests: fix monkey-patching
1 parent a3d7b13 commit e086c9c

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

tests/testthat/test-ppc-distributions.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -731,7 +731,7 @@ testthat::test_that("ppc_pit_ecdf takes correct PIT computation branch", {
731731
which(sapply(as.list(body(ppc_pit_ecdf)), function(e) {
732732
is.call(e) && deparse(e[[1]]) == "if" &&
733733
grepl("pareto_pit", deparse(e[[2]]))
734-
}))
734+
}))[1]
735735
]] <- quote({
736736

737737
if (isTRUE(pareto_pit) && is.null(pit)) {

tests/testthat/test-ppc-loo.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ testthat::test_that("ppc_loo_pit_ecdf takes correct PIT computation branch", {
611611
which(sapply(as.list(body(ppc_loo_pit_ecdf)), function(e) {
612612
is.call(e) && deparse(e[[1]]) == "if" &&
613613
grepl("pareto_pit", deparse(e[[2]]))
614-
}))
614+
}))[1]
615615
]] <- quote({
616616

617617
if (isTRUE(pareto_pit) && is.null(pit)) {

0 commit comments

Comments
 (0)