1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
|
Author: Michael R. Crusoe <crusoe@debian.org>
Description: skip tests that depend on r-cran-alluvial as that is not yet in the archive
Forwarded: not-needed
--- r-cran-ggalluvial.orig/tests/testthat/test-geom-alluvium.r
+++ r-cran-ggalluvial/tests/testthat/test-geom-alluvium.r
@@ -3,6 +3,7 @@
# visual tests
test_that("`geom_alluvium` draws correctly", {
+ skip_if_not_installed("alluvial")
d1 <- as.data.frame(Titanic)
a1 <- aes(y = Freq, axis1 = Class, axis2 = Sex, axis3 = Age, fill = Survived)
a2 <- aes(y = Freq, axis1 = Class, axis2 = Sex)
@@ -34,6 +35,7 @@
})
test_that("`geom_alluvium()` recognizes alternative curves", {
+ skip_if_not_installed("alluvial")
data(vaccinations)
skip_on_cran()
--- r-cran-ggalluvial.orig/tests/testthat/test-stat-alluvium.r
+++ r-cran-ggalluvial/tests/testthat/test-stat-alluvium.r
@@ -3,6 +3,7 @@
# weights are used but not returned
test_that("`stat_alluvium` weights computed variables but drops weight", {
+ skip_if_not_installed("alluvial")
# not cementing alluvia
data <- expand.grid(alluvium = letters[1:3], x = 1:2)
data$stratum <- LETTERS[c(1, 1, 2, 1, 2, 2)]
@@ -29,6 +30,7 @@
# negative values
test_that("`stat_alluvium` orders alluvia without regard to negative values", {
+ skip_if_not_installed("alluvial")
data <- expand.grid(alluvium = letters[1:2], x = 1:2)
data$stratum <- LETTERS[1]
data$y <- c(-1, -1)
@@ -51,6 +53,7 @@
# aesthetic binding
test_that("`stat_alluvium` orders alluvia correctly according to `aes.bind`", {
+ skip_if_not_installed("alluvial")
data <- expand.grid(alluvium = letters[1:4], x = 1:2)
data$stratum <- LETTERS[1:2][c(1, 1, 2, 2, 2, 2, 2, 1)]
data$y <- 1
@@ -83,6 +86,7 @@
# exceptional data
test_that("`stat_flow` handles exceptional data with out errors", {
+ skip_if_not_installed("alluvial")
data(Refugees, package = "alluvial")
refugees_sub <- subset(Refugees, year %in% c(2003, 2005, 2010, 2013))
gg <- ggplot(refugees_sub, aes(x = year, y = refugees, alluvium = country)) +
|