From 79736f91e496672d4dce7e800e4114bfb72f8765 Mon Sep 17 00:00:00 2001 From: dtm2451 Date: Wed, 3 Jan 2024 11:26:36 -0500 Subject: [PATCH] fix broken test --- tests/testthat/test-heatmap.R | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/testthat/test-heatmap.R b/tests/testthat/test-heatmap.R index ac3ed91..4ac4717 100644 --- a/tests/testthat/test-heatmap.R +++ b/tests/testthat/test-heatmap.R @@ -81,26 +81,26 @@ test_that("heatmap allows users to adjust breaks, legend_breaks, legend_labels", plotScoreHeatmap(results = pred, silent = TRUE, normalize = FALSE, color = colorRampPalette(c("red", "blue"))(33), - breaks = seq(-5, 5, 34), + breaks = seq(-5, 5, length.out = 34), legend_breaks = c(-5, 0, 5), legend_labels = c("manually", "set", "labels")), "pheatmap") non_norm_args <- plotScoreHeatmap(results = pred, silent = TRUE, return.data = TRUE, normalize = FALSE, color = colorRampPalette(c("red", "blue"))(33), - breaks = seq(-5, 5, 34), + breaks = seq(-5, 5, length.out = 34), legend_breaks = c(-5, 0, 5), legend_labels = c("manually", "set", "labels")) - expect_equal(non_norm_args$breaks, seq(-5, 5, 34)) + expect_equal(non_norm_args$breaks, seq(-5, 5, length.out = 34)) expect_equal(non_norm_args$legend_breaks, c(-5, 0, 5)) expect_equal(non_norm_args$legened_labels, c("manually", "set", "labels")) norm_args <- plotScoreHeatmap(results = pred, silent = TRUE, return.data = TRUE, normalize = TRUE, color = colorRampPalette(c("red", "blue"))(33), - breaks = seq(-5, 5, 34), + breaks = seq(-5, 5, length.out = 34), legend_breaks = c(-5, 0, 5), legend_labels = c("manually", "set", "labels")) - expect_equal(norm_args$breaks, seq(-5, 5, 34)) + expect_equal(norm_args$breaks, seq(-5, 5, length.out = 34)) expect_equal(norm_args$legend_breaks, c(-5, 0, 5)) expect_equal(norm_args$legened_labels, c("manually", "set", "labels")) })