Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARROW-16073: [R] clean-up date time unit testing once tzdb is available on Windows #12883

Closed
wants to merge 24 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions r/tests/testthat/test-dplyr-funcs-datetime.R
Original file line number Diff line number Diff line change
Expand Up @@ -841,8 +841,6 @@ test_that("month() supports integer input", {
test_df_month
)

skip_on_os("windows") # https://issues.apache.org/jira/browse/ARROW-13168

compare_dplyr_binding(
.input %>%
# R returns ordered factor whereas Arrow returns character
Expand Down Expand Up @@ -904,8 +902,6 @@ test_that("month() errors with double input and returns NA with int outside 1:12
})

test_that("date works in arrow", {
# https://issues.apache.org/jira/browse/ARROW-13168
skip_on_os("windows")
# this date is specific since lubridate::date() is different from base::as.Date()
# since as.Date returns the UTC date and date() doesn't
test_df <- tibble(
Expand Down Expand Up @@ -1123,7 +1119,6 @@ test_that("difftime works correctly", {
ignore_attr = TRUE
)

skip_on_os("windows")
test_df_with_tz <- tibble(
time1 = as.POSIXct(
c("2021-02-20", "2021-07-31", "2021-10-30", "2021-01-31"),
Expand Down
7 changes: 5 additions & 2 deletions r/tests/testthat/test-dplyr-funcs-type.R
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,6 @@ test_that("`as.Date()` and `as_date()`", {
fixed = TRUE
)


# we do not support as.Date() with double/ float (error surfaced from C++)
# TODO revisit after https://issues.apache.org/jira/browse/ARROW-15798
expect_error(
Expand Down Expand Up @@ -958,7 +957,11 @@ test_that("`as_datetime()`", {
})

test_that("format date/time", {
skip_on_os("windows") # https://issues.apache.org/jira/browse/ARROW-13168
# locale issues
# TODO revisit after https://issues.apache.org/jira/browse/ARROW-16399 is done
if (tolower(Sys.info()[["sysname"]]) == "windows") {
withr::local_locale(LC_TIME = "C")
}
# In 3.4 the lack of tzone attribute causes spurious failures
skip_if_r_version("3.4.4")

Expand Down