From e01e8415625c11557acfc044193a4bde676c8201 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Berthet?= Date: Fri, 12 Jul 2024 14:40:26 +0200 Subject: [PATCH] fix side effects from antaresRead function (readClusterDesc, ...) (#178) * fix side effects from antaresRead function (readClusterDesc, ...) * update newsmd --- NEWS.md | 1 + R/removeArea.R | 2 +- tests/testthat/test-createCluster.R | 15 --------------- 3 files changed, 2 insertions(+), 16 deletions(-) diff --git a/NEWS.md b/NEWS.md index 36f25334..4780833d 100644 --- a/NEWS.md +++ b/NEWS.md @@ -19,6 +19,7 @@ NEW FEATURES (Antares v8.8) : BUGFIXES : * `createBindingConstraint()` in API mode (for study 0) { bc_not_remove_cluster <- detect_pattern_in_binding_constraint(pattern = paste0(clusters_area$area, ".", clusters_area$cluster), opts = opts) } diff --git a/tests/testthat/test-createCluster.R b/tests/testthat/test-createCluster.R index 08b69782..725b919d 100644 --- a/tests/testthat/test-createCluster.R +++ b/tests/testthat/test-createCluster.R @@ -106,21 +106,6 @@ test_that("Create cluster with pollutants params (new feature v8.6)",{ createArea(name = "test") - test_that("Create cluster default call (new feature v8.6)",{ - # default call now create without pollutants - createCluster(area = getAreas()[1], - cluster_name = "cluster_default", - overwrite = TRUE) - - res_cluster <- antaresRead::readClusterDesc() - - pollutants_names <- names(antaresEditObject::list_pollutants_values()) - - # check default values - testthat::expect_false(all( - pollutants_names %in% names(res_cluster))) - }) - test_that("Create cluster with bad parameter pollutant",{ bad_pollutants_param <- "not_a_list"