File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -57,6 +57,20 @@ setup_cli_workspace <- function(prefix = "mosuite_normalize_counts_test_") {
5757 )
5858}
5959
60+ is_compatible_multiOmicDataSet <- function (moo ) {
61+ moo_classes <- class(moo )
62+ has_moo_class_label <-
63+ inherits(moo , " multiOmicDataSet" ) ||
64+ any(grepl(" (^|::)multiOmicDataSet$" , moo_classes ))
65+
66+ is_current_s7_moo <- tryCatch(
67+ S7 :: S7_inherits(moo , MOSuite :: multiOmicDataSet ),
68+ error = function (e ) FALSE
69+ )
70+
71+ return (is_current_s7_moo || has_moo_class_label )
72+ }
73+
6074expect_outputs_created <- function (results_dir ) {
6175 moo_path <- file.path(results_dir , " moo" , " moo-norm.rds" )
6276
@@ -70,8 +84,9 @@ expect_outputs_created <- function(results_dir) {
7084 )
7185
7286 moo <- readr :: read_rds(moo_path )
87+
7388 expect_true(
74- inherits (moo , " MOSuite::multiOmicDataSet " ),
89+ is_compatible_multiOmicDataSet (moo ),
7590 info = " Output should be an S7 multiOmicDataSet object"
7691 )
7792
Original file line number Diff line number Diff line change @@ -146,7 +146,7 @@ test_that("code/run accepts plotting CLI arguments", {
146146
147147 moo <- readr :: read_rds(file.path(results_dir , " moo" , " moo-norm.rds" ))
148148 expect_true(
149- S7 :: S7_inherits (moo , MOSuite :: multiOmicDataSet ),
149+ is_compatible_multiOmicDataSet (moo ),
150150 info = " Output should be an S7 multiOmicDataSet object"
151151 )
152152 expect_true(
You can’t perform that action at this time.
0 commit comments