Skip to content

Commit 8851898

Browse files
committed
Avoid base namespace mock in cache tests
Finding: Windows R-CMD-check crashed twice after test-compiler-cache.R completed, first in test-superassign-logical-subscript.R and then in test-div-cast.R, with exit code -1073741819. Resolution: the default site Makevars cache test no longer mocks base::R.home(). It now mocks quickr_default_site_makevars_path(), keeping the test scoped to quickr internals and avoiding a base namespace mutation in Windows parallel test workers.
1 parent 273c6ff commit 8851898

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

tests/testthat/test-compiler-cache.R

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2062,10 +2062,7 @@ test_that("quickr_cached_r_cmd_config_value keys on default site Makevars", {
20622062
writeLines("FC=gfortran", site_makevars)
20632063
calls <- 0L
20642064
local_mocked_bindings(
2065-
R.home = function(...) r_home,
2066-
.package = "base"
2067-
)
2068-
local_mocked_bindings(
2065+
quickr_default_site_makevars_path = function() site_makevars,
20692066
quickr_r_cmd_config_probe = function(name) {
20702067
calls <<- calls + 1L
20712068
list(value = paste0("value-", calls), ok = TRUE)

0 commit comments

Comments
 (0)