Skip to content

Commit 154b779

Browse files
committed
Not that many traces
1 parent b50a969 commit 154b779

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

tests/testthat/test-ggplot-smooth.R

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,20 +43,15 @@ test_that("geom_smooth() respects colour aesthetic", {
4343
# number of showlegends should equal the number of factor levels
4444
n <- sum(unlist(sapply(info$traces, "[[", "showlegend")))
4545
expect_equal(n, nlevels(d$cut))
46-
info <- expect_traces(p5, 11, "colour2")
46+
info <- expect_traces(p5, 7, "colour2")
4747
n <- sum(unlist(sapply(info$traces, "[[", "showlegend")))
4848
expect_equal(n, nlevels(d$cut))
4949
})
5050

51-
# why are 5 traces for point being created here??
52-
#p6 <- qplot(carat, price, fill = cut, data = d) + geom_smooth()
5351
p7 <- qplot(carat, price, data = d) + geom_smooth(aes(fill = cut))
5452

5553
test_that("geom_smooth() respects fill aesthetic", {
56-
# info <- expect_traces(p6, 11, "fill")
57-
# n <- sum(unlist(sapply(info$traces, "[[", "showlegend")))
58-
# expect_equal(n, nlevels(d$cut))
59-
info <- expect_traces(p7, 11, "fill2")
54+
info <- expect_traces(p7, 7, "fill2")
6055
n <- sum(unlist(sapply(info$traces, "[[", "showlegend")))
6156
expect_equal(n, nlevels(d$cut))
6257
})

0 commit comments

Comments
 (0)