Skip to content

Commit

Permalink
related to #260
Browse files Browse the repository at this point in the history
  • Loading branch information
njtierney committed Jun 28, 2020
1 parent 46e2339 commit 586c451
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/testthat/test-impute-median.R
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,13 @@ test_that("impute_median_all works with shadow", {
})

test_that("impute_median_all retains proper shadow values", {
skip_on_cran()
expect_equal(unbind_data(impute_median_all(aq_shadow)),
unbind_data(aq_shadow))
})

test_that("impute_median_all retains proper shadow values", {
skip_on_cran()
expect_equal(unbind_data(impute_median_all(aq_shadow)),
unbind_data(aq_shadow))
})
Expand All @@ -99,11 +101,13 @@ test_that("impute_median_all works with shadow", {
})

test_that("impute_median_all retains proper shadow values", {
skip_on_cran()
expect_equal(unbind_data(impute_median_all(aq_shadow)),
unbind_data(aq_shadow))
})

test_that("impute_median_all retains proper shadow values", {
skip_on_cran()
expect_equal(unbind_data(impute_median_all(aq_shadow)),
unbind_data(aq_shadow))
})
4 changes: 4 additions & 0 deletions tests/testthat/test-impute_mean.R
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,13 @@ test_that("impute_mean_at works with shadow", {
})

test_that("impute_mean_at retains proper shadow values", {
skip_on_cran()
expect_equal(unbind_data(impute_mean_at(aq_shadow, vars(Ozone))),
unbind_data(aq_shadow))
})

test_that("impute_mean_at retains proper shadow values", {
skip_on_cran()
expect_equal(unbind_data(impute_mean_at(aq_shadow, vars(Ozone))),
unbind_data(aq_shadow))
})
Expand All @@ -95,11 +97,13 @@ test_that("impute_mean_all works with shadow", {
})

test_that("impute_mean_all retains proper shadow values", {
skip_on_cran()
expect_equal(unbind_data(impute_mean_all(aq_shadow)),
unbind_data(aq_shadow))
})

test_that("impute_mean_all retains proper shadow values", {
skip_on_cran()
expect_equal(unbind_data(impute_mean_all(aq_shadow)),
unbind_data(aq_shadow))
})
2 changes: 2 additions & 0 deletions tests/testthat/test-special-missing-values.R
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,15 @@ df_many_recode <- df %>%
new_shade_levels <- c("!NA", "NA", "NA_broken_machine", "NA_broken_temp")

test_that("special missings levels are updated for many recodes", {
skip_on_cran()
expect_equal(levels(df_many_recode$wind_NA),
new_shade_levels)
expect_equal(levels(df_many_recode$temp_NA),
new_shade_levels)
})

test_that("special missings are put in the right place for many recodes", {
skip_on_cran()
expect_equal(as.character(df_many_recode$wind_NA),
c("NA_broken_temp", "!NA", "!NA"))
expect_equal(as.character(df_many_recode$temp_NA),
Expand Down

0 comments on commit 586c451

Please sign in to comment.