Skip to content

Commit 4ef3523

Browse files
committed
Commented out 'pairwise' tests
1 parent 130cd4b commit 4ef3523

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

tests/testthat/test-disc-ds.cor.R

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,14 @@ test_that("simple D3 setup", {
4646
expect_equal(res$`dimensions of D3 in combined studies`[2], 4)
4747
})
4848

49-
test_that("simple disc test, naAction='casewise.complete', type='split'", {
50-
expect_error(ds.cor('D3', naAction='casewise.complete', type='split'), "There are some DataSHIELD errors, list them with datashield.errors()", fixed = TRUE)
49+
#test_that("simple disc test, naAction='casewise.complete', type='split'", {
50+
test_that("simple disc test, type='split'", {
51+
# expect_error(ds.cor('D3', naAction='casewise.complete', type='split'), "There are some DataSHIELD errors, list them with datashield.errors()", fixed = TRUE)
52+
expect_error(ds.cor('D3', type='split'), "There are some DataSHIELD errors, list them with datashield.errors()", fixed = TRUE)
5153
res.errors <- DSI::datashield.errors()
5254

5355
expect_length(res.errors, 1)
54-
expect_equal(res.errors$sim2, "Command 'corDS(\"D3\", NULL, \"casewise.complete\")' failed on 'sim2': Error while evaluating 'dsBase::corDS(\"D3\", NULL, \"casewise.complete\")' -> Error : ERROR: The ratio of the number of variables over the number of individual-level\n records exceeds the allowed threshold, there is a possible risk of disclosure\n", fixed = TRUE)
56+
expect_equal(res.errors$sim2, "Command 'corDS(\"D3\", NULL)' failed on 'sim2': Error while evaluating 'dsBase::corDS(\"D3\", NULL)' -> Error : ERROR: The ratio of the number of variables over the number of individual-level\n records exceeds the allowed threshold, there is a possible risk of disclosure\n", fixed = TRUE)
5557
})
5658

5759
test_that("simple disc test, naAction='pairwise.complete', type='split'", {
@@ -69,12 +71,14 @@ test_that("simple disc test, naAction='pairwise.complete', type='split'", {
6971
# expect_true(is.na(res[[3]]$`Error message`))
7072
})
7173

72-
test_that("simple disc test, naAction='casewise.complete', type='combine'", {
73-
expect_error(ds.cor('D3', naAction='casewise.complete', type='combine'), "There are some DataSHIELD errors, list them with datashield.errors()", fixed = TRUE)
74+
#test_that("simple disc test, naAction='casewise.complete', type='combine'", {
75+
test_that("simple disc test, type='combine'", {
76+
# expect_error(ds.cor('D3', naAction='casewise.complete', type='combine'), "There are some DataSHIELD errors, list them with datashield.errors()", fixed = TRUE)
77+
expect_error(ds.cor('D3', type='combine'), "There are some DataSHIELD errors, list them with datashield.errors()", fixed = TRUE)
7478
res.errors <- DSI::datashield.errors()
7579

7680
expect_length(res.errors, 1)
77-
expect_equal(res.errors$sim2, "Command 'corDS(\"D3\", NULL, \"casewise.complete\")' failed on 'sim2': Error while evaluating 'dsBase::corDS(\"D3\", NULL, \"casewise.complete\")' -> Error : ERROR: The ratio of the number of variables over the number of individual-level\n records exceeds the allowed threshold, there is a possible risk of disclosure\n", fixed = TRUE)
81+
expect_equal(res.errors$sim2, "Command 'corDS(\"D3\", NULL)' failed on 'sim2': Error while evaluating 'dsBase::corDS(\"D3\", NULL)' -> Error : ERROR: The ratio of the number of variables over the number of individual-level\n records exceeds the allowed threshold, there is a possible risk of disclosure\n", fixed = TRUE)
7882

7983
# expect_length(res, 5)
8084
# expect_length(res$`Error message`, 3)

0 commit comments

Comments
 (0)