From ea9526c0d52c441844c40810268de1f4c4908a22 Mon Sep 17 00:00:00 2001 From: Jan Kapar Date: Mon, 3 Jun 2024 21:53:58 +0200 Subject: [PATCH] adjust tests --- tests/testthat/test_expct.R | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/testthat/test_expct.R b/tests/testthat/test_expct.R index dfd623d..c29f559 100644 --- a/tests/testthat/test_expct.R +++ b/tests/testthat/test_expct.R @@ -40,14 +40,14 @@ test_that("expct works with partial sample", { res <- expct(psi, evidence = evi, parallel = FALSE) expect_s3_class(res, "data.frame") expect_equal(nrow(res), nrow(evi)) - expect_equal(ncol(res), ncol(iris)) - expect_equal(colnames(res), colnames(iris)) + expect_equal(ncol(res), ncol(iris) - ncol(evi)) + expect_equal(colnames(res), colnames(iris)[3:4]) # Petal.* and Species missing evi <- iris[1:3, 1:2] res <- expct(psi, evidence = evi, parallel = FALSE) expect_s3_class(res, "data.frame") expect_equal(nrow(res), nrow(evi)) - expect_equal(ncol(res), ncol(iris)) - expect_equal(colnames(res), colnames(iris)) + expect_equal(ncol(res), ncol(iris) - ncol(evi)) + expect_equal(colnames(res), colnames(iris)[3:5]) })