Skip to content

Commit 350fa68

Browse files
committed
Skip entire expose-functions test file on WSL
1 parent 7aedaec commit 350fa68

1 file changed

Lines changed: 3 additions & 15 deletions

File tree

tests/testthat/test-model-expose-functions.R

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
context("model-expose-functions")
22

3+
# Standalone functions not expected to work on WSL yet
4+
skip_if(os_is_wsl())
5+
36
set_cmdstan_path()
47

58
function_decl <- "
@@ -81,14 +84,11 @@ fit <- mod$sample(data = data_list)
8184

8285

8386
test_that("Functions can be exposed in model object", {
84-
skip_if(os_is_wsl())
8587
expect_no_error(mod$expose_functions(verbose = TRUE))
8688
})
8789

8890

8991
test_that("Functions handle types correctly", {
90-
skip_if(os_is_wsl())
91-
9292
### Scalar
9393

9494
expect_equal(mod$functions$rtn_int(10), 10)
@@ -178,8 +178,6 @@ test_that("Functions handle types correctly", {
178178
})
179179

180180
test_that("Functions handle complex types correctly", {
181-
skip_if(os_is_wsl())
182-
183181
### Scalar
184182

185183
complex_scalar <- complex(real = 2.1, imaginary = 21.3)
@@ -262,7 +260,6 @@ test_that("Functions handle complex types correctly", {
262260
})
263261

264262
test_that("Functions can be exposed in fit object", {
265-
skip_if(os_is_wsl())
266263
fit$expose_functions(verbose = TRUE)
267264

268265
expect_equal(
@@ -272,7 +269,6 @@ test_that("Functions can be exposed in fit object", {
272269
})
273270

274271
test_that("Compiled functions can be copied to global environment", {
275-
skip_if(os_is_wsl())
276272
expect_message(
277273
fit$expose_functions(global = TRUE),
278274
"Functions already compiled, copying to global environment",
@@ -287,7 +283,6 @@ test_that("Compiled functions can be copied to global environment", {
287283

288284

289285
test_that("Functions can be compiled with model", {
290-
skip_if(os_is_wsl())
291286
mod <- cmdstan_model(model, force_recompile = TRUE, compile_standalone = TRUE)
292287
fit <- mod$sample(data = data_list)
293288

@@ -341,7 +336,6 @@ test_that("compile_standalone warns but doesn't error if no functions", {
341336
})
342337

343338
test_that("rng functions can be exposed", {
344-
skip_if(os_is_wsl())
345339
function_decl <- "functions { real wrap_normal_rng(real mu, real sigma) { return normal_rng(mu, sigma); } }"
346340
stan_prog <- paste(function_decl,
347341
paste(readLines(testing_stan_file("bernoulli")),
@@ -367,8 +361,6 @@ test_that("rng functions can be exposed", {
367361
})
368362

369363
test_that("Overloaded functions give meaningful errors", {
370-
skip_if(os_is_wsl())
371-
372364
funcode <- "
373365
functions {
374366
real fun1(real x) { return x; }
@@ -385,8 +377,6 @@ test_that("Overloaded functions give meaningful errors", {
385377
})
386378

387379
test_that("Exposing external functions errors before v2.32", {
388-
skip_if(os_is_wsl())
389-
390380
fake_cmdstan_version("2.26.0")
391381

392382
tmpfile <- tempfile(fileext = ".hpp")
@@ -413,8 +403,6 @@ test_that("Exposing external functions errors before v2.32", {
413403
})
414404

415405
test_that("Exposing functions with precompiled model gives meaningful error", {
416-
skip_if(os_is_wsl())
417-
418406
stan_file <- write_stan_file("
419407
functions {
420408
real a_plus_b(real a, real b) { return a + b; }

0 commit comments

Comments
 (0)