Closed averissimo closed 11 months ago
Found an edge case when testing a package against the master branch of this repository.
master
It works fine with current release v0.2.2, but fails against master
v0.2.2
testthat::test_that("logger::log_appender `do.call` works the same as calling function", { t <- withr::local_tempfile() old_appender <- log_appender() do.call( logger::log_appender, list( logger::appender_file(t) ) ) |> testthat::expect_no_error() logger::log_info("42") testthat::expect_length(readLines(t), 1) log_appender(old_appender) }) testthat::test_that("logger::log_threshold `do.call` works the same as calling function", { old_threshold <- logger::log_threshold() do.call( logger::log_threshold, list( logger::WARN ) ) |> testthat::expect_no_error() logger::log_info("42") logger::log_threshold(old_threshold) })
Thanks for reporting this! Could you please check if #125 solves the problem? Would appreciate a review on the PR.
Found an edge case when testing a package against the
master
branch of this repository.It works fine with current release
v0.2.2
, but fails againstmaster