Skip to content

Commit

Permalink
Fixing build issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Schuemie authored and Schuemie committed Jan 21, 2022
1 parent 4919308 commit 1d3ceef
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 0 additions & 2 deletions tests/testthat/test-01.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ library(dplyr)
connectionDetails <- Eunomia::getEunomiaConnectionDetails()
Eunomia::createCohorts(connectionDetails)

# connection <- DatabaseConnector::connect(connectionDetails )

test_that("Compute MDRR", {
result <- computeMdrr(connectionDetails = connectionDetails,
cdmDatabaseSchema = "main",
Expand Down
5 changes: 3 additions & 2 deletions tests/testthat/test-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ test_that("Package results", {
comparative = TRUE,
nesting = FALSE,
firstExposureOnly = TRUE)
tempDir <- tempdir()
tempFolder <- tempfile()
dir.create(tempFolder)

packageOhdsiBenchmarkResults(estimates = estimates,
controlSummary = controlSummary,
Expand All @@ -34,5 +35,5 @@ test_that("Package results", {
metrics <- computeOhdsiBenchmarkMetrics(exportFolder = tempDir),
"'response' must have two levels")

unlink(tempDir, recursive = TRUE)
unlink(tempFolder, recursive = TRUE)
})
6 changes: 3 additions & 3 deletions tests/testthat/test-plots.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ library(testthat)
test_that("Plot ROCs", {
set.seed(123)
data <- EmpiricalCalibration::simulateControls(n = 50 * 3, trueLogRr = log(c(1, 2, 4)))
fileName <- tempfile(pattern = "roc", fileext = ".png")
fileName <- tempfile(fileext = ".png")

plot <- plotRocsInjectedSignals(logRr = data$logRr, trueLogRr = data$trueLogRr, showAucs = TRUE,
fileName = fileName)
Expand All @@ -17,7 +17,7 @@ test_that("Plot ROCs", {
test_that("Plot coverage", {
set.seed(123)
data <- EmpiricalCalibration::simulateControls(n = 50 * 3, trueLogRr = log(c(1, 2, 4)))
fileName <- tempfile(pattern = "cov", fileext = ".png")
fileName <- tempfile(fileext = ".png")

plot <- plotCoverageInjectedSignals(logRr = data$logRr, seLogRr = data$seLogRr, trueLogRr = data$trueLogRr,
fileName = fileName)
Expand All @@ -31,7 +31,7 @@ test_that("Plot coverage", {
test_that("Plot controls", {
set.seed(123)
data <- EmpiricalCalibration::simulateControls(n = 50 * 3, trueLogRr = log(c(1, 2, 4)))
fileName <- tempfile(pattern = "con", fileext = ".png")
fileName <- tempfile(fileext = ".png")

plot <- plotControls(logRr = data$logRr, seLogRr = data$seLogRr, trueLogRr = data$trueLogRr,
fileName = fileName)
Expand Down

0 comments on commit 1d3ceef

Please sign in to comment.