Skip to content

Commit

Permalink
uncomment test
Browse files Browse the repository at this point in the history
  • Loading branch information
bfgray3 committed May 1, 2018
1 parent 18c3093 commit 900a2fc
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
21 changes: 11 additions & 10 deletions tests/testthat/test-dummy.R
Original file line number Diff line number Diff line change
Expand Up @@ -76,24 +76,25 @@ test_that("catto_dummy: one tibble training column.", {
}

})

#################
### TEST DATA ###
#################

#test_that("catto_dummy correctly encodes test data.", {
test_that("catto_dummy correctly encodes test data.", {

# test_df <- data.frame(y = seq_len(3),
# x1 = c("e", NA, "b"),
# x2 = c("c", "d","c"))
small_test_df <- data.frame(y = seq_len(3),
x1 = c("e", NA, "b"),
x2 = c("c", "d","c"))

# expected_test <- data.frame(y = seq_len(3),
# x2 = c("c", "d", "c"),
# x1b = c(NA, NA, 1))
expected_test <- data.frame(y = seq_len(3),
x2 = c("c", "d", "c"),
x1b = c(NA, NA, 1))

# expect_equal(catto_dummy(df_fact, x1, test = test_df),
# list(train = expected_x1, test = expected_test))
expect_equal(catto_dummy(df_fact, x1, test = small_test_df),
list(train = expected_x1_df_fact, test = expected_test))

#})
})

####################
### MANY COLUMNS ###
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-freq.R
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ test_that("catto_freq: one tibble training column.", {
})


##################
#################
### TEST DATA ###
##################
#################

test_that("catto_freq correctly encodes test data.", {

Expand Down

0 comments on commit 900a2fc

Please sign in to comment.