AlenkaF commented on a change in pull request #10334: URL: https://github.com/apache/arrow/pull/10334#discussion_r642422637
########## File path: r/tests/testthat/test-dplyr-string-functions.R ########## @@ -493,3 +493,81 @@ test_that("edge cases in string detection and replacement", { tibble(x = c("ABC")) ) }) + +test_that("strptime", { + + t_string <- tibble(x = c("2018-10-07 19:04:05", NA)) + t_stamp <- tibble(x = c(lubridate::ymd_hms("2018-10-07 19:04:05"), NA)) + t_stampPDT <- tibble(x = c(lubridate::ymd_hms("2018-10-07 19:04:05", tz = "PDT"), NA)) + + expect_equivalent( + t_string %>% + Table$create() %>% + mutate( + x = strptime(x) + ) %>% + collect(), + t_stamp, + check.tzone = FALSE + ) + + expect_equivalent( + t_string %>% + Table$create() %>% + mutate( + x = strptime(x, format = "%Y-%m-%d %H:%M:%S") + ) %>% + collect(), + t_stamp, + check.tzone = FALSE + ) + + expect_equivalent( Review comment: If I use `check.tzone = FALSE` they are equal. Should I use `expect_equal()` instead of `expect_equivalent()` in the test? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org