From 061cc7f01701084fe090a0ae20028acda1ab04fd Mon Sep 17 00:00:00 2001 From: Henrik Bengtsson Date: Thu, 15 Jul 2021 12:38:15 +0200 Subject: [PATCH] TROUBLESHOOTING: Make sure parallelly::makeClusterPSOCK() works on macOS, cf. https://github.com/HenrikBengtsson/parallelly/issues/62 --- DESCRIPTION | 4 +++- tests/testthat.R | 3 +++ tests/testthat/test-parallelly.R | 13 +++++++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 tests/testthat.R create mode 100644 tests/testthat/test-parallelly.R diff --git a/DESCRIPTION b/DESCRIPTION index e737d86..8fec948 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -5,5 +5,7 @@ Description: A minimal, valid, complete R package that can be used as a baseline Authors@R: c( person("Henrik", "Bengtsson", role=c("aut", "cre", "cph"), email = "henrikb@braju.com")) +Suggests: + testthat, + parallelly License: GPL (>= 3) -RoxygenNote: 6.0.1 diff --git a/tests/testthat.R b/tests/testthat.R new file mode 100644 index 0000000..5ea0f67 --- /dev/null +++ b/tests/testthat.R @@ -0,0 +1,3 @@ +library(testthat) +library(teeny) +test_check("teeny") diff --git a/tests/testthat/test-parallelly.R b/tests/testthat/test-parallelly.R new file mode 100644 index 0000000..3f002f0 --- /dev/null +++ b/tests/testthat/test-parallelly.R @@ -0,0 +1,13 @@ +context("parallelly") + +test_that("makeClusterPSOCK(1) works", { + cl <- parallelly::makeClusterPSOCK(1) + print(cl) + parallel::stopCluster(cl) +}) + +test_that("makeClusterPSOCK(2) works", { + cl <- parallelly::makeClusterPSOCK(2) + print(cl) + parallel::stopCluster(cl) +})