tests/testthat/test-viewAntares.R

# context("viewAntares")
# 
# sapply(studyPathS, function(studyPath){
#   
# opts <- setSimulationPath(studyPath)
# 
# # describe("viewAntares", {
# #   with_mock(
# #     `utils::View` = function(x, title) {print(title)},
# #     {
# #       it("views an antaresDataTable", {
# #         data <- readAntares(timeStep = "annual", select = "LOAD", showProgress = FALSE)
# #         expect_output(viewAntares(data), "data")
# #       })
# #       
# #       it("views an antaresDataList", {
# #         data <- readAntares("all", "all", timeStep = "annual", 
# #                             select = c("LOAD", "FLOW LIN."), showProgress = FALSE)
# #         expect_output(viewAntares(data), "data\\$areas")
# #         expect_output(viewAntares(data), "data\\$links")
# #       })
# #     }
# #   )
# #   
# #   with_mock(
# #     `utils::View` = function(x, title) {return(NULL)},
# #     {
# #       it("displays a warning if there is more than 100 columns", {
# #         data <- readAntares(timeStep = "annual", showProgress = FALSE)
# #         expect_warning(viewAntares(data), "100 columns")
# #       })
# #     }
# #   )
# # })
# })
# if(.requireRhdf5_Antares(stopP = FALSE) & .runH5Test){
#   rhdf5::h5closeAll()
# }
# 
# if(.requireRhdf5_Antares(stopP = FALSE) & .runH5Test){
#   if(dir.exists(tpDir))
#   {
#     unlink(tpDir, recursive = TRUE)
#   }
# }

Try the antaresRead package in your browser

Any scripts or data that you put into this service are public.

antaresRead documentation built on Sept. 13, 2024, 1:12 a.m.