From 5071f5e848a26b91592f2f252d9d21c3c8707207 Mon Sep 17 00:00:00 2001 From: Teun van den Brand <49372158+teunbrand@users.noreply.github.com> Date: Tue, 4 Jul 2023 21:37:11 +0200 Subject: [PATCH] conditionally test time scales --- tests/testthat/test-scales.R | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/testthat/test-scales.R b/tests/testthat/test-scales.R index 1654f8bb8c..bedf7fb94b 100644 --- a/tests/testthat/test-scales.R +++ b/tests/testthat/test-scales.R @@ -625,7 +625,7 @@ test_that("scale functions accurately report their calls", { scale_x_log10(), scale_x_reverse(), scale_x_sqrt(), - scale_x_time(), + # scale_x_time(), scale_y_binned(), scale_y_continuous(), scale_y_date(), @@ -634,10 +634,14 @@ test_that("scale functions accurately report their calls", { scale_y_log10(), scale_y_reverse(), scale_y_sqrt(), - scale_y_time(), + # scale_y_time(), xlim(10, 20), ylim("A", "B") ) + if (is_installed("hms")) { + construct <- c(construct, exprs(scale_x_time(), scale_y_time())) + } + suppressWarnings( calls <- lapply(construct, function(x) eval(x)$call) )