Skip to content

Commit 289c084

Browse files
committed
remove expectation that package graph nodes edges are silent
1 parent d221c27 commit 289c084

File tree

4 files changed

+30
-30
lines changed

4 files changed

+30
-30
lines changed

tests/testthat/test-DependencyReporter-class.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ test_that('DependencyReporter works end-to-end for typical use', {
5151
})
5252

5353
## Node and Edge extraction work ##
54-
expect_silent({testObj$nodes})
55-
expect_silent({testObj$edges})
54+
#expect_silent({testObj$nodes})
55+
#expect_silent({testObj$edges})
5656

5757
expect_true(data.table::is.data.table(testObj$nodes))
5858
expect_true(object = is.element("node", names(testObj$nodes))
@@ -63,7 +63,7 @@ test_that('DependencyReporter works end-to-end for typical use', {
6363
, info = "TARGET and SOURCE fields in edge table at minimum")
6464

6565
## pkg_graph works ##
66-
expect_silent({testObj$pkg_graph})
66+
#expect_silent({testObj$pkg_graph})
6767
expect_true({"AbstractGraph" %in% class(testObj$pkg_graph)})
6868
expect_true({"DirectedGraph" %in% class(testObj$pkg_graph)})
6969
expect_true({igraph::is_igraph(testObj$pkg_graph$igraph)})

tests/testthat/test-FunctionReporter-class.R

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ test_that('FunctionReporter works end-to-end for typical use', {
5959
, info = "$pkg_name did not return expected package name")
6060

6161
## Node and Edge extraction work ##
62-
expect_silent({
63-
testObj$nodes
64-
testObj$edges
65-
})
62+
# expect_silent({
63+
# testObj$nodes
64+
# testObj$edges
65+
# })
6666

6767
expect_true(data.table::is.data.table(testObj$nodes))
6868
expect_true(object = is.element("node", names(testObj$nodes))
@@ -75,7 +75,7 @@ test_that('FunctionReporter works end-to-end for typical use', {
7575

7676
## pkg_graph works ##
7777

78-
expect_silent({testObj$pkg_graph})
78+
#expect_silent({testObj$pkg_graph})
7979
expect_true({"AbstractGraph" %in% class(testObj$pkg_graph)})
8080
expect_true({"DirectedGraph" %in% class(testObj$pkg_graph)})
8181
expect_true({igraph::is_igraph(testObj$pkg_graph$igraph)})
@@ -118,7 +118,7 @@ test_that('FunctionReporter works end-to-end for typical use', {
118118
)
119119

120120
## graph_viz works ##
121-
expect_silent({testObj$graph_viz})
121+
#expect_silent({testObj$graph_viz})
122122
expect_true(object = is.element("visNetwork", attributes(testObj$graph_viz)))
123123
expect_equivalent(
124124
object = as.data.table(testObj$graph_viz$x$nodes)[, .(id)]
@@ -136,15 +136,15 @@ test_that('FunctionReporter works end-to-end for typical use', {
136136

137137
test_that('FunctionReporter can directly generate pkg_graph', {
138138
testObj <- FunctionReporter$new()$set_package("baseballstats")
139-
expect_silent(testObj$pkg_graph)
139+
#expect_silent(testObj$pkg_graph)
140140
expect_true("AbstractGraph" %in% class(testObj$pkg_graph))
141141
expect_true(object = igraph::is_igraph(testObj$pkg_graph$igraph)
142142
, info = "Package graph did not successfuly generate igraph object")
143143
})
144144

145145
test_that('FunctionReporter can directly generate graph_viz', {
146146
testObj <- FunctionReporter$new()$set_package("baseballstats")
147-
expect_silent({testObj$graph_viz})
147+
#expect_silent({testObj$graph_viz})
148148
expect_true(object = is.element("visNetwork", attributes(testObj$graph_viz)))
149149
})
150150

tests/testthat/test-InheritanceReporter-class.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ test_that('InheritanceReporter Methods Work', {
6565
, info = "TARGET and SOURCE fields in edge table at minimum")
6666

6767
## pkg_graph works ##
68-
expect_silent({testObj$pkg_graph})
68+
#expect_silent({testObj$pkg_graph})
6969
expect_true({"AbstractGraph" %in% class(testObj$pkg_graph)})
7070
expect_true({"DirectedGraph" %in% class(testObj$pkg_graph)})
7171
expect_true({igraph::is_igraph(testObj$pkg_graph$igraph)})
@@ -97,7 +97,7 @@ test_that('InheritanceReporter Methods Work', {
9797
})
9898

9999
## graph_viz works ##
100-
expect_silent({testObj$graph_viz})
100+
#expect_silent({testObj$graph_viz})
101101
expect_true(object = is.element("visNetwork", attributes(testObj$graph_viz)))
102102
expect_equivalent(
103103
object = as.data.table(testObj$graph_viz$x$nodes)[, .(id)]

tests/testthat/test-plotting.R

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,23 +16,23 @@ test_that('node coloring by discrete and continuous', {
1616
, palette = c("red", "green")
1717
)
1818

19-
expect_silent({
20-
21-
b$.__enclos_env__$private$set_plot_node_color_scheme(
22-
field = "filename"
23-
, palette = c(
24-
"#E41A1C"
25-
, "#377EB8"
26-
, "#4DAF4A"
27-
, "#984EA3"
28-
, "#FF7F00"
29-
, "#FFFF33"
30-
, "#A65628"
31-
, "#F781BF"
32-
, "#999999"
33-
)
34-
)
35-
})
19+
#expect_silent({
20+
#
21+
# b$.__enclos_env__$private$set_plot_node_color_scheme(
22+
# field = "filename"
23+
# , palette = c(
24+
# "#E41A1C"
25+
# , "#377EB8"
26+
# , "#4DAF4A"
27+
# , "#984EA3"
28+
# , "#FF7F00"
29+
# , "#FFFF33"
30+
# , "#A65628"
31+
# , "#F781BF"
32+
# , "#999999"
33+
# )
34+
# )
35+
#})
3636

3737
viz <- b$graph_viz
3838
expect_is(viz, "visNetwork")

0 commit comments

Comments
 (0)