From 8cfc6df79ebb99a6f619b72bca00ba85d6f03a72 Mon Sep 17 00:00:00 2001 From: ZAYED Date: Fri, 1 Nov 2024 11:19:01 +0000 Subject: [PATCH] removed microbenchmark code lines in test and dependencies. the time was still less than 0.25 seconds in the logs so lowered to 0.25 --- DESCRIPTION | 1 - tests/testthat/test-z_replace.R | 9 ++------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index c8eded0..7bbb0b9 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -36,7 +36,6 @@ Imports: withr Suggests: knitr, - microbenchmark, readxl, rmarkdown, spelling, diff --git a/tests/testthat/test-z_replace.R b/tests/testthat/test-z_replace.R index 93bb166..e8559c7 100644 --- a/tests/testthat/test-z_replace.R +++ b/tests/testthat/test-z_replace.R @@ -136,15 +136,10 @@ end_time <- Sys.time() test_time <- difftime(end_time, start_time, units = "secs") # calculating the time it takes -test_time <- summary(microbenchmark::microbenchmark(z_replace(df), - unit = "seconds", times = 100 -))$max -print(test_time) - -# testing that the speed is less than 1 second +# testing that the speed is less than 0.25 second test_that("Speed of the function", { - expect_equal(test_time < 1, TRUE) + expect_equal(test_time < 0.25, TRUE) }) # Check error message for empty data frame