Check for tibble package before using it on tests by llrs-roche · Pull Request #971 · insightsengineering/rtables (original) (raw)

══ Failed tests ════════════════════════════════════════════════════════════════ ── Error ('test-default_split_funs.R:275:3'): trim_levels_to_map split function works ── Error in tribble(~ARM, ~RACE, "A: Drug X", "ASIAN", "A: Drug X", "WHITE", "C: Combination", "BLACK OR AFRICAN AMERICAN", "C: Combination", "NATIVE HAWAIIAN OR OTHER PACIFIC ISLANDER"): could not find function "tribble" ── Error ('test-lyt-tabulation.R:287:3'): ref_group comparisons work ─────────── Error in tribble(~valname, ~label, ~levelcombo, ~exargs, "A_", "Arm 1", c("A: Drug X"), list(), "B_C", "Arms B & C", c("B: Placebo", "C: Combination"), list()): could not find function "tribble" ── Error ('test-printing.R:887:3'): showing higher-level ncols works ─────────── Error in tribble(~valname, ~label, ~levelcombo, ~exargs, "A_C", "Arms A+C", c("A: Drug X", "C: Combination"), list()): could not find function "tribble" ── Error ('test-subset-access.R:196:3'): make_row_df, make_col_df give paths which all work ── Error in tribble(~valname, ~label, ~levelcombo, ~exargs, "A_", "Arm 1", c("A: Drug X"), list(), "B_C", "Arms B & C", c("B: Placebo", "C: Combination"), list()): could not find function "tribble"

[ FAIL 4 | WARN 0 | SKIP 11 | PASS 923 ] Error: Test failures

This PR adds skip_if_not_installed where appropriate and also checks that testthat is available before trying to run checks.