Running ‘testthat.R’ [4s/7s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(withr)
  > 
  > test_check("withr")
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error (test-timezone.R:5:5): with_timezone: changes the time zone ───────────
  Error: cannot change value of locked binding for '.sys.timezone'
  Backtrace:
      █
   1. ├─testthat::expect_equal(...) test-timezone.R:5:4
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─withr::with_timezone("CET", Sys.timezone())
   5.   └─base::assign(".sys.timezone", NA, envir = baseenv())
  ── Error (test-timezone.R:5:5): with_timezone: changes the time zone ───────────
  Error: cannot change value of locked binding for '.sys.timezone'
  Backtrace:
      █
   1. ├─testthat::expect_equal(...) test-timezone.R:5:4
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─withr::with_timezone("CET", Sys.timezone())
   5.   └─base::assign(".sys.timezone", old, envir = baseenv())
  ── Error (test-timezone.R:16:5): with_timezone: restores the time zone ─────────
  Error: cannot change value of locked binding for '.sys.timezone'
  Backtrace:
      █
   1. ├─testthat::expect_equal(...) test-timezone.R:16:4
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─withr::with_timezone("CET", Sys.timezone())
   5.   └─base::assign(".sys.timezone", NA, envir = baseenv())
  ── Error (test-timezone.R:16:5): with_timezone: restores the time zone ─────────
  Error: cannot change value of locked binding for '.sys.timezone'
  Backtrace:
      █
   1. ├─testthat::expect_equal(...) test-timezone.R:16:4
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─withr::with_timezone("CET", Sys.timezone())
   5.   └─base::assign(".sys.timezone", old, envir = baseenv())
  ── Error (test-timezone.R:31:5): local_timezone: changes the time zone ─────────
  Error: cannot change value of locked binding for '.sys.timezone'
  Backtrace:
      █
   1. ├─testthat::expect_identical(...) test-timezone.R:31:4
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─withr::with_timezone("CET", Sys.timezone())
   5.   └─base::assign(".sys.timezone", NA, envir = baseenv())
  ── Error (test-timezone.R:31:5): local_timezone: changes the time zone ─────────
  Error: cannot change value of locked binding for '.sys.timezone'
  Backtrace:
      █
   1. ├─testthat::expect_identical(...) test-timezone.R:31:4
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─withr::with_timezone("CET", Sys.timezone())
   5.   └─base::assign(".sys.timezone", old, envir = baseenv())
  ── Error (test-timezone.R:45:5): local_timezone: restores the time zone ────────
  Error: cannot change value of locked binding for '.sys.timezone'
  Backtrace:
      █
   1. └─withr:::fun("CET") test-timezone.R:45:4
   2.   └─withr::local_timezone(tzone) test-timezone.R:42:6
   3.     └─base::assign(".sys.timezone", NA, envir = baseenv())
  ── Error (test-timezone.R:45:5): local_timezone: restores the time zone ────────
  Error: cannot change value of locked binding for '.sys.timezone'
  Backtrace:
      █
   1. └─withr:::fun("CET") test-timezone.R:45:4
   2.   └─(function (envir) ... test-timezone.R:45:4
  
  [ FAIL 8 | WARN 0 | SKIP 0 | PASS 299 ]
  Error: Test failures
  Execution halted