Skip to content

Commit

Permalink
removed debugging marks in tests and functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathalie Vialaneix committed Jan 12, 2024
1 parent 0694cb6 commit cae48ef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 16 deletions.
4 changes: 2 additions & 2 deletions R/helpers.R
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,8 @@ alt.plotNode <- function(x1, x2, subtree, type, center, leaflab, dLeaf, nodePar,
vln <- NULL
if (is.leaf(child) && leaflab == "textlike") {
nodeText <- asTxt(attr(child, "label"))
cat("nodeText 2 vaut : ")
print(nodeText)
# cat("nodeText 2 vaut : ")
# print(nodeText)
if (getOption("verbose"))
cat("-- with \"label\"", format(nodeText))
hln <- 0.6 * strwidth(nodeText, cex = lab.cex)/2
Expand Down
15 changes: 1 addition & 14 deletions tests/testthat/test_chac.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,7 @@ test_that("Methods of class 'chac'", {
dissim <- dist(iris[, 1:4])^2
sim <- 1-as.matrix(dissim)/2
fit <- adjClust(sim)
adjclust::select(fit, type = "capushe")
adjclust::select(fit, type = "bs", graph = TRUE)
#adjclust::select(fit, graph = TRUE) # error plot DDSE (uses base "plot" ?)

class(fit)
print(fit)
head(fit)
summary(fit)
fit2 <- correct(fit)
expect_error(plot(fit2, mode = "corrected"),
"Already corrected 'chac' object. 'mode' must be set to 'standard'")
Expand All @@ -22,14 +15,8 @@ test_that("Methods of class 'chac'", {
p <- plot(fit2, nodeLabel = TRUE, leaflab = "textlike")
attr(fit2, "edgetext") <- "test text" # does not work
p <- plot(fit2, nodeLabel = TRUE)
options(verbose = TRUE)
p <- plot(fit2, nodeLabel = TRUE, leaflab = "textlike")
options(verbose = FALSE)
diagnose(fit)
diagnose(fit, graph = TRUE)
diagnose(fit, verbose = TRUE)

fit_h <- hclust(dissim)
expect_error(cutree_chac(fit_h),
"'tree' must be of class 'chac'")
expect_error(cutree_chac(fit_h), "'tree' must be of class 'chac'")
})

0 comments on commit cae48ef

Please sign in to comment.