Skip to content

Commit

Permalink
added v8.5 test case + tests (#201)
Browse files Browse the repository at this point in the history
Co-authored-by: MANSOURI Assil Ext <[email protected]>
  • Loading branch information
AssilMa and MANSOURI Assil Ext authored Apr 3, 2023
1 parent dcec3d5 commit d91c56f
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ BUGFIXES:

* Major correction to `setSimulationPath()` (mc-all/mc-ind) (#199)

DEV:

* Added new test study v8.5.
* Package no longer tested on study v6.



# antaresRead 2.5.0
Expand Down
Binary file added inst/test_v8/test_case_study_v85.tar.gz
Binary file not shown.
Binary file removed inst/testdata/antares-test-study-v6.tar.gz
Binary file not shown.
4 changes: 1 addition & 3 deletions tests/testthat/test-mcaggreg.R
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@

context("Test mc-all build")

skip("")

opts <- antaresRead::setSimulationPath(tail(studyPathS, 1))

outh <- readAntares(areas = "all",
Expand All @@ -16,7 +14,7 @@ outm <- readAntares(areas = "all",
outa <- readAntares(areas = "all",
links = "all", timeStep = "annual", showProgress = FALSE)

aggregateResult(opts, timestep = "hourly", writeOutput = TRUE, verbose = 0)
aggregateResult_old(opts, timestep = "hourly", writeOutput = TRUE, verbose = 0)

outhafter <- readAntares(areas = "all", links = "all",
showProgress = FALSE)
Expand Down
12 changes: 6 additions & 6 deletions tests/testthat/test-readAntares_bc.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ context("Function readAntares (binding constraints)")

sapply(studyPathSV8, function(studyPath){

opts <- setSimulationPath(studyPath)
#suppress for horizon warning
suppressWarnings(opts <- setSimulationPath(studyPath))

if (simOptions()$antaresVersion >= 840)
test_that("Binding constraints importation is ok", {
suppressWarnings(results <- readAntares(areas="all", bindingConstraints = TRUE))
bindingConstraints_input <- readIni(file.path("input", "bindingconstraints", "bindingconstraints.ini"))
expect_is(results$bindingConstraints, "data.table")
expect_equal(nrow(results$bindingConstraints), 24 * 7 * nweeks * length(bindingConstraints_input))
suppressWarnings(results <- readAntares(areas="all", bindingConstraints = TRUE, timeStep = "daily"))
if (!is.null(results$bindingConstraints)) results <- results$bindingConstraints
expect_is(results, "data.table")
})

})
})

0 comments on commit d91c56f

Please sign in to comment.