Skip to content

Commit

Permalink
Merge pull request #1169 from r-lib/fix-test-io-warning
Browse files Browse the repository at this point in the history
Suppress warning in test-io
  • Loading branch information
IndrajeetPatil authored Dec 8, 2023
2 parents 10efce2 + 4c2c0ab commit ebe4997
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions tests/testthat/test-io.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ test_that("non-ASCII characters are handled properly for text styling", {


test_that("non-ASCII characters are handled properly for file styling", {
skip_if(.Platform$OS.type != "windows")

# to avoid warnings
# on unix: 'OS reports request to set locale to "English_United States.1252" cannot be honored'
# on win: 'using locale code page other than 65001 ("UTF-8") may cause problems'
withr::local_options(list(warn = -1L))
withr::with_locale(
c(LC_CTYPE = "English_United States.1252"),
{
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/tests-cache-require-serial.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ test_that("top-level test: Caches top-level expressions efficiently on style_tex
partially_cached_benchmark["elapsed"] * 1.5,
not_cached_benchmark["elapsed"]
)
expect_lt(full_cached_benchmark["elapsed"] * 30, benchmark["elapsed"])
expect_lt(full_cached_benchmark["elapsed"] * 20, benchmark["elapsed"])
})


Expand Down

0 comments on commit ebe4997

Please sign in to comment.