Skip to content

Commit

Permalink
add skip if not r version
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilHvitfeldt committed Sep 18, 2024
1 parent 6c90981 commit 22fb740
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/testthat/test-date.R
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ test_that("check_name() is used", {
test_that("locale argument have recipe work in different locale", {
old_locale <- Sys.getlocale("LC_TIME")
withr::defer(Sys.setlocale("LC_TIME", old_locale))
Sys.setlocale("LC_TIME", 'fr_FR.UTF-8')
Sys.setlocale("LC_TIME", 'fr_FR.UTF8')

date_rec <- recipe(~ Dan + Stefan, examples) %>%
step_date(all_predictors()) %>%
Expand All @@ -122,6 +122,9 @@ test_that("locale argument have recipe work in different locale", {
})

test_that("locale argument works when specified", {
skip_if(getRversion() <= "4.3.0")
# Locales on GHA are weird on old versions of R

old_locale <- Sys.getlocale("LC_TIME")
withr::defer(Sys.setlocale("LC_TIME", old_locale))
date_rec <- recipe(~ Dan + Stefan, examples) %>%
Expand Down

0 comments on commit 22fb740

Please sign in to comment.