Skip to content

Commit b6e387c

Browse files
committed
Fix python unit tests and R package code for CI checks
1 parent 4c027df commit b6e387c

File tree

5 files changed

+382
-388
lines changed

5 files changed

+382
-388
lines changed

R/posterior_transformation.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -419,9 +419,11 @@ compute_contrast_bart_model <- function(
419419
if (!is.matrix(rfx_basis_0) || !is.matrix(rfx_basis_1)) {
420420
stop("'rfx_basis_0' and 'rfx_basis_1' must be matrices")
421421
}
422-
if ((nrow(rfx_basis_0) != nrow(X)) || (nrow(rfx_basis_1) != nrow(X))) {
422+
if (
423+
(nrow(rfx_basis_0) != nrow(X_0)) || (nrow(rfx_basis_1) != nrow(X_1))
424+
) {
423425
stop(
424-
"'rfx_basis_0' and 'rfx_basis_1' must have the same number of rows as 'X'"
426+
"'rfx_basis_0' and 'rfx_basis_1' must have the same number of rows as 'X_0' and 'X_1'"
425427
)
426428
}
427429
if (

test/R/testthat/test-api-combinations.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ test_that("Quick check of interactions between components of BART functionality"
372372
skip_on_cran()
373373
# Code from: https://github.com/r-lib/testthat/blob/main/R/skip.R
374374
skip_if(
375-
isTRUE(as.logical(Sys.getenv("RUN_SLOW_TESTS", "false"))),
375+
isFALSE(as.logical(Sys.getenv("RUN_SLOW_TESTS", "false"))),
376376
"skipping slow tests"
377377
)
378378

0 commit comments

Comments
 (0)