Skip to content

Commit

Permalink
Remove logger setup/teardown in individual files
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexAxthelm committed Oct 25, 2024
1 parent 579441d commit f155565
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 45 deletions.
15 changes: 0 additions & 15 deletions tests/testthat/test-analysis_prechecks.R
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@
## save current settings so that we can reset later
threshold <- logger::log_threshold()
appender <- logger::log_appender()
layout <- logger::log_layout()
on.exit({
## reset logger settings
logger::log_threshold(threshold)
logger::log_layout(layout)
logger::log_appender(appender)
})

logger::log_appender(logger::appender_stdout)
logger::log_threshold(logger::FATAL)
logger::log_layout(logger::layout_simple)

test_that("audit_prechecks works when all files are present", {
pacta_data_dir <- withr::local_tempdir()
filenames <- c(
Expand Down
15 changes: 0 additions & 15 deletions tests/testthat/test-audit_prechecks.R
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@
## save current settings so that we can reset later
threshold <- logger::log_threshold()
appender <- logger::log_appender()
layout <- logger::log_layout()
on.exit({
## reset logger settings
logger::log_threshold(threshold)
logger::log_layout(layout)
logger::log_appender(appender)
})

logger::log_appender(logger::appender_stdout)
logger::log_threshold(logger::FATAL)
logger::log_layout(logger::layout_simple)

test_that("audit_prechecks works when all files are present", {
pacta_data_dir <- withr::local_tempdir()
filenames <- c(
Expand Down
15 changes: 0 additions & 15 deletions tests/testthat/test-calc_weights_prechecks.R
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@
## save current settings so that we can reset later
threshold <- logger::log_threshold()
appender <- logger::log_appender()
layout <- logger::log_layout()
on.exit({
## reset logger settings
logger::log_threshold(threshold)
logger::log_layout(layout)
logger::log_appender(appender)
})

logger::log_appender(logger::appender_stdout)
logger::log_threshold(logger::FATAL)
logger::log_layout(logger::layout_simple)

test_that("audit_prechecks works when all files are present", {
data_dir <- withr::local_tempdir()
filenames <- c(
Expand Down

0 comments on commit f155565

Please sign in to comment.