Skip to content

Commit

Permalink
Regenerate ES test data and update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonysena committed Aug 29, 2024
1 parent 33ce405 commit bfec2d8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions extras/ESModule-SimulationFunctions.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright 2024 Observational Health Data Sciences and Informatics
#
# This file is part of EvidenceSynthesisModule
# This file is part of Strategus
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# Functions used in SimulateResultsForTestin.R
# Functions used in extras/ESModule-SimulateResultsForTesting.R

library(survival)

Expand Down Expand Up @@ -201,7 +201,6 @@ simulateEo <- function(exposureId, outcomeId, analysisId, incidenceRateRatio = 1
mutate(
exposuresOutcomeSetId = outcomeId,
covariateId = covariateSettings$outputIds[1],
outcomeId = outcomeId,
analysisId = analysisId,
databaseId = i
)
Expand Down
Binary file modified inst/testdata/esmodule/results.sqlite
Binary file not shown.
4 changes: 2 additions & 2 deletions tests/testthat/test-EvidenceSynthesisModule.R
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,10 @@ test_that("Run module", {

test_that("Skipped analyses as specified", {
# We specified we didn't want cohort method analysis ID 2 in evidence synthesis ID 2:
results <- CohortGenerator::readCsv(file.path(testResultsFolder, "es_cm_result.csv"))
results <- CohortGenerator::readCsv(file.path(testResultsFolder, "EvidenceSynthesisModule", "es_cm_result.csv"))
expect_false(any(results$evidenceSynthesisAnalysisId == 2 & results$analysisId == 2))

results <- CohortGenerator::readCsv(file.path(testResultsFolder, "es_sccs_result.csv"))
results <- CohortGenerator::readCsv(file.path(testResultsFolder, "EvidenceSynthesisModule", "es_sccs_result.csv"))
expect_false(any(results$evidenceSynthesisAnalysisId == 2 & results$analysisId == 2))
})

Expand Down

0 comments on commit bfec2d8

Please sign in to comment.