[Debian-med-packaging] Failure in test suite of hypergraph
Andreas Tille
andreas at an3as.eu
Fri Oct 17 14:52:27 UTC 2014
Hi,
I'm packaging BioConductor 3.0 modules for Debian (targeting at
"experimental" distribution since the freeze for the next release is to
close and we will not manage to reach this unfortunately). When doing
so I'm trying to run all test suites and I detected a slight problem in
hypergraph. One test out of 13 fails and it boils down to the code in
file hypergraph/inst/unitTests/hypergraph_test.R. If I add two simple
debug lines with print() the problem becomes obvious:
testHyperedges <- function() {
nodes <- LETTERS[1:4]
## hEdges <- lapply(list("A", LETTERS[1:2], LETTERS[3:4]), "Hyperedge")
eList <- list("A", LETTERS[1:2], LETTERS[3:4])
hEdges <- l2hel(eList)
hg <- new("Hypergraph", nodes=nodes, hyperedges=hEdges)
## Add "default" labels
for (i in 1:length(hEdges)) {
he <- hEdges[[i]]
label(he) <- as.character(i)
hEdges[[i]] <- he
}
checkEquals(hEdges, hyperedges(hg))
names(eList) <- paste("e", 1:length(eList), sep="")
hEdges <- l2hel(eList)
print(names(eList))
print(hyperedgeLabels(hg))
checkEquals(names(eList), hyperedgeLabels(hg))
}
which results in the following output:
Loading required package: hypergraph
Loading required package: graph
Executing test function testHyperedges ... [1] "e1" "e2" "e3"
[1] "1" "2" "3"
Timing stopped at: 0.004 0 0.004
Error in checkEquals(names(eList), hyperedgeLabels(hg)) :
3 string mismatches
done successfully.
RUNIT TEST PROTOCOL -- Fri Oct 17 16:54:41 2014
***********************************************
Number of test functions: 1
Number of errors: 0
Number of failures: 1
Please check the label code to fix the unit test.
Kind regards
Andreas.
--
http://fam-tille.de
More information about the Debian-med-packaging
mailing list