From 7ceedc4fd9eb291b969bd624c14f52751a208015 Mon Sep 17 00:00:00 2001 From: Alex Pickering Date: Wed, 22 May 2024 16:27:03 -0700 Subject: [PATCH] fix test Signed-off-by: Alex Pickering --- pipeline-runner/tests/testthat/test-qc-7-embed_and_cluster.R | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pipeline-runner/tests/testthat/test-qc-7-embed_and_cluster.R b/pipeline-runner/tests/testthat/test-qc-7-embed_and_cluster.R index 278b5d1c..0bbf75d5 100644 --- a/pipeline-runner/tests/testthat/test-qc-7-embed_and_cluster.R +++ b/pipeline-runner/tests/testthat/test-qc-7-embed_and_cluster.R @@ -319,11 +319,12 @@ test_that("format_cell_sets_object doesn't hardcore all keys as louvain (need fo cell_sets <- rbind(cell_sets, more_cell_sets) color_pool <- mock_color_pool(n_clusters) - algos <- c("louvain", "leiden") + algos <- c("louvain", "leiden", "other") for (algo in algos) { res <- format_cluster_cellsets(cell_sets, algo, color_pool) - expect_equal(res$key, algo) + expected <- ifelse(algo %in% c('louvain', 'leiden'), 'louvain', algo) + expect_equal(res$key, expected) } })