From 1397b1462d39b9cce497b190400ee0dea986b718 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Thu, 16 May 2024 21:17:01 +0300 Subject: [PATCH] Profile name ordering --- tests/testthat/test-profiling.R | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/testthat/test-profiling.R b/tests/testthat/test-profiling.R index 218969e7..638f1fdc 100644 --- a/tests/testthat/test-profiling.R +++ b/tests/testthat/test-profiling.R @@ -12,7 +12,9 @@ test_that("profiling works if profiling data is present", { profiles <- fit$profiles() expect_equal(length(profiles), 4) expect_equal(dim(profiles[[1]]), c(3,9)) - expect_equal(profiles[[1]][,"name"], c("udf", "priors", "glm")) + for (name in profiles[[1]][,"name"]) { + expect_true(name %in% c("udf", "priors", "glm")) + } file.remove(fit$profile_files()) expect_error( @@ -24,7 +26,9 @@ test_that("profiling works if profiling data is present", { profiles_no_csv <- fit$profiles() expect_equal(length(profiles_no_csv), 4) expect_equal(dim(profiles_no_csv[[1]]), c(3,9)) - expect_equal(profiles_no_csv[[1]][,"name"], c("udf", "priors", "glm")) + for (name in profiles_no_csv[[1]][,"name"]) { + expect_true(name %in% c("udf", "priors", "glm")) + } }) test_that("profiling errors if no profiling files are present", {