Skip to content

Commit

Permalink
waterDayYear: Fix test for winbuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
brownag committed Dec 3, 2021
1 parent 58569ef commit 075016a
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion tests/testthat/test-waterDayYear.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,19 @@ test_that("works as expected", {
expect_true(inherits(res, 'data.frame'))
expect_true(length(x) == nrow(res))

# # text interface, with YYYY-MM-DD hh:mm:ss
# res <- waterDayYear("2000-12-05 00:00:00")
# expect_equal(res$wy, 2001L)
#
# # NOTE: 00:00:00 is not robust to time zone differences e.g. winbuilder
# # times are interpreted differently depending on locale
# # resulting in either WD 66 or 65
# expect_equal(res$wd, 66L)

# text interface, with YYYY-MM-DD hh:mm:ss
res <- waterDayYear("2000-12-05 00:00:00")
res <- waterDayYear("2000-12-05 12:00:00")
expect_equal(res$wy, 2001L)

expect_equal(res$wd, 66L)


Expand Down

0 comments on commit 075016a

Please sign in to comment.