From 0b16a822a83bd6496eb9cda688fa88b121f81e6f Mon Sep 17 00:00:00 2001 From: eviecarter33 Date: Fri, 13 Dec 2024 13:40:57 +0000 Subject: [PATCH] debug --- tests/testthat/test_gen_tibble_versioning.R | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/tests/testthat/test_gen_tibble_versioning.R b/tests/testthat/test_gen_tibble_versioning.R index 85c9c6f..0854d10 100644 --- a/tests/testthat/test_gen_tibble_versioning.R +++ b/tests/testthat/test_gen_tibble_versioning.R @@ -16,8 +16,19 @@ test_that("versioning updates correctly through gt_order_loci",{ # get the gt filenames files <- gt_get_file_names(test_gt) + + # do the files exist? + expect_true(file.exists(files[1])) + expect_true(file.exists(files[2])) + # remove extension file <- gsub(".bk","",files[2]) + + # does the directory still exist? + print(dirname(file)) + tempfile_dir <- dirname(file) + expect_true(dir.exists(tempfile_dir)) + # create gt using the same backingfile name test_gt <- gen_tibble(x = test_genotypes, loci = test_loci, indiv_meta = test_indiv_meta, quiet = TRUE, @@ -55,12 +66,19 @@ test_that("versioning if .bk already exists",{ # get the gt filenames files <- gt_get_file_names(test_gt) + + # do the files exist? + expect_true(file.exists(files[1])) + expect_true(file.exists(files[2])) + # remove the .rds expect_true(file.remove(files[1])) + # remove extension file <- gsub(".bk","",files[2]) - # check the directory + # does the directory still exist? + print(dirname(file)) tempfile_dir <- dirname(file) expect_true(dir.exists(tempfile_dir))