Skip to content

Commit

Permalink
EOD
Browse files Browse the repository at this point in the history
  • Loading branch information
richelbilderbeek committed Jan 15, 2025
1 parent 7eef57f commit a84d8cf
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions tests/testthat/test-babette_issue_108.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ test_that("tipdates file must be used in the created file", {
fasta_filename <- get_beautier_path("babette_issue_108.fasta")
output_filename <- get_beautier_tempfilename()
tipdates_filename <- get_beautier_path("babette_issue_108_tipdates.txt")
expected_output_filename <- get_beautier_path("babette_issue_108_expected.xml")
tipdates_table <- readr::read_tsv(
tipdates_filename,
col_names = c("A", "year"),
Expand All @@ -38,13 +39,18 @@ test_that("tipdates file must be used in the created file", {
tipdates_filename = tipdates_filename,
clock_model = create_rln_clock_model(),
site_model = create_gtr_site_model(),
mcmc = create_mcmc(chain_length = 1000),
mcmc = create_mcmc(chain_length = 10000000),
tree_prior = create_cbs_tree_prior(),
beauti_options = create_beauti_options_v2_6()
beauti_options = create_beauti_options_v2_6(nucleotides_uppercase = TRUE)
)
)
expect_true(file.exists(output_filename))
beast2_xml_lines <- readr::read_lines(output_filename)
expected_beast2_xml_lines <- readr::read_lines(expected_output_filename)

readr::write_lines(beast2_xml_lines, "~/created.xml")
readr::write_lines(expected_beast2_xml_lines, "~/expected.xml")

expect_true(
length(
stringr::str_subset(
Expand All @@ -54,6 +60,7 @@ test_that("tipdates file must be used in the created file", {
) > 0
)


# If this passes, the issue is solved
expect_equal(beast2_xml_lines, expected_beast2_xml_lines)
remove_beautier_folder()
})

0 comments on commit a84d8cf

Please sign in to comment.