Skip to content

Commit 04ccab6

Browse files
yutannihilationpaleolimbot
authored andcommitted
Set locale explicitly before testing visual cases (#3287)
1 parent ddfc379 commit 04ccab6

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

tests/testthat/test-scale_date.R

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ context("scale_date")
44
# Visual tests ------------------------------------------------------------
55

66
test_that("date scale draws correctly", {
7+
# datetime labels are locale dependent
8+
withr::local_locale(c(LC_TIME = "C"))
9+
710
set.seed(321)
811
df <- data_frame(
912
dx = seq(as.Date("2012-02-29"), length.out = 100, by = "1 day")[sample(100, 50)],

tests/testthat/test-sec-axis.R

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,9 @@ test_that("sec_axis() respects custom transformations", {
226226
})
227227

228228
test_that("sec_axis works with date/time/datetime scales", {
229+
# datetime labels are locale dependent
230+
withr::local_locale(c(LC_TIME = "C"))
231+
229232
df <- data_frame(
230233
dx = seq(as.POSIXct("2012-02-29 12:00:00",
231234
tz = "UTC",

0 commit comments

Comments
 (0)