Skip to content

Commit 854fde2

Browse files
authored
Rely on withr fix (#2124)
1 parent 433101d commit 854fde2

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

R/expect-self-test.R

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ expect_snapshot_reporter <- function(
120120
paths = test_path("reporters/tests.R")
121121
) {
122122
local_options(rlang_trace_format_srcrefs = FALSE)
123-
local_rng_version("3.3")
123+
withr::local_rng_version("3.3")
124124
set.seed(1014)
125125
# withr::local_seed(1014)
126126

@@ -133,12 +133,6 @@ expect_snapshot_reporter <- function(
133133
)
134134
}
135135

136-
# to work around https://github.com/r-lib/withr/issues/167
137-
local_rng_version <- function(version, .local_envir = parent.frame()) {
138-
withr::defer(RNGversion(as.character(getRversion())), envir = .local_envir)
139-
suppressWarnings(RNGversion(version))
140-
}
141-
142136
# Use specifically for testthat tests in order to override the
143137
# defaults found when starting the reporter
144138
local_output_override <- function(

0 commit comments

Comments
 (0)