testthat icon indicating copy to clipboard operation
testthat copied to clipboard

option or envvar to skip LANG='C' check?

Open heavywatal opened this issue 4 years ago • 3 comments

I have LANG='C' in my .Renviron to disable locales, and testthat::expect_true() suddenly started blaming it. How can I solve this warning?

Warning (test-write.R:5:3): save_as() works
Changing language has no effect when envvar LANG='C'
Backtrace:
 1. testthat::expect_true(file.exists(path))
      at test-write.R:5:2
 2. testthat:::expect_waldo_constant(act, TRUE, info = info)
 3. testthat:::waldo_compare(...)
 4. reporter$local_user_output()
 5. testthat::local_reproducible_output(...)
 6. withr::local_language(lang, .local_envir = .env)

heavywatal avatar Feb 04 '22 14:02 heavywatal

Closing this because the issue seems to have been solved (in testthat, withr, waldo, or else?)

heavywatal avatar Jun 20 '22 06:06 heavywatal

It has not been solved yet.

heavywatal avatar Jun 22 '22 08:06 heavywatal

#1566 may be a duplicate

heavywatal avatar Jun 22 '22 08:06 heavywatal

Duplicate of #1566

hadley avatar Sep 19 '22 19:09 hadley

#1662 solved #1566, but current main still emits warnings with envvar LANG='C'.

heavywatal avatar Sep 21 '22 23:09 heavywatal