Skip to content

Commit

Permalink
comment out the date function tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ablack3 committed Nov 9, 2024
1 parent 3ae4b8d commit 62c3094
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions tests/testthat/test-dbplyr.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@ for (testServer in testServers) {
})
}

test_that("Test dbplyr date functions on non-dbplyr data", {
date <- c(as.Date("2000-02-01"), as.Date("2000-12-31"), as.Date("2000-01-31"))

date2 <- c(as.Date("2000-02-05"), as.Date("2000-11-30"), as.Date("2002-01-31"))

expect_equal(dateDiff("day", date, date2), c(4, -31, 731))

expect_equal(eoMonth(date), c(as.Date("2000-02-29"), as.Date("2000-12-31"), as.Date("2000-01-31")))

expect_equal(dateAdd("day", 1, date), c(as.Date("2000-02-02"), as.Date("2001-01-01"), as.Date("2000-02-01")))

expect_equal(year(date), c(2000, 2000, 2000))

expect_equal(month(date), c(2, 12, 1))

expect_equal(day(date), c(1, 31, 31))
})
# test_that("Test dbplyr date functions on non-dbplyr data", {
# date <- c(as.Date("2000-02-01"), as.Date("2000-12-31"), as.Date("2000-01-31"))
#
# date2 <- c(as.Date("2000-02-05"), as.Date("2000-11-30"), as.Date("2002-01-31"))
#
# expect_equal(dateDiff("day", date, date2), c(4, -31, 731))
#
# expect_equal(eoMonth(date), c(as.Date("2000-02-29"), as.Date("2000-12-31"), as.Date("2000-01-31")))
#
# expect_equal(dateAdd("day", 1, date), c(as.Date("2000-02-02"), as.Date("2001-01-01"), as.Date("2000-02-01")))
#
# expect_equal(year(date), c(2000, 2000, 2000))
#
# expect_equal(month(date), c(2, 12, 1))
#
# expect_equal(day(date), c(1, 31, 31))
# })

0 comments on commit 62c3094

Please sign in to comment.