Skip to content

Commit

Permalink
Moved defer down
Browse files Browse the repository at this point in the history
  • Loading branch information
mvankessel-EMC committed Aug 22, 2023
1 parent 7ddeaa5 commit f4c2d61
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions tests/testthat/test-eunomia.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,6 @@ test_that("Check installation", {

test_that("Multiple analyses", {
outputFolder <- tempfile(pattern = "cmData")
withr::defer(
{
unlink(outputFolder, recursive = TRUE)
},
testthat::teardown_env()
)

tcos1 <- createTargetComparatorOutcomes(
targetId = 1,
Expand Down Expand Up @@ -301,6 +295,13 @@ test_that("Multiple analyses", {
targetComparatorOutcomesList = targetComparatorOutcomesList <- list(tcos1, tcos2, "brokenObject")
)
})

withr::defer(
{
unlink(outputFolder, recursive = TRUE)
},
testthat::teardown_env()
)
})


Expand Down

0 comments on commit f4c2d61

Please sign in to comment.