Skip to content

Commit 10cc3af

Browse files
committed
make error message neutral between versions of DSI
1 parent b18800f commit 10cc3af

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

tests/testthat/test-smk-isDefined.R

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
#
1515

1616
# context("isDefined::smk::setup")
17-
1817
connect.discordant.dataset.simple(list("A", "B", "C"))
1918

2019
test_that("setup", {
@@ -30,7 +29,7 @@ test_that("setup", {
3029
# context("isDefined::smk::default")
3130
test_that("default test, dataframe D", {
3231
res <- isDefined(ds.test_env$connections, "D")
33-
32+
3433
expect_length(class(res), 1)
3534
expect_true(all("list" %in% class(res)))
3635
expect_length(res, 3)
@@ -45,7 +44,7 @@ test_that("default test, dataframe E", {
4544

4645
test_that("default test, dataframe column E$A", {
4746
# expect_error(isDefined(ds.test_env$connections, "E$A"), "The input object E$A is not defined in discordant1, discordant2, discordant3!", fixed=TRUE)
48-
expect_error(isDefined(ds.test_env$connections, "E$A"), "There are some DataSHIELD errors, list them with datashield.errors()", fixed=TRUE)
47+
expect_error(isDefined(ds.test_env$connections, "E$A"), "There are some DataSHIELD errors", fixed=TRUE)
4948

5049
err <- DSI::datashield.errors();
5150

@@ -94,7 +93,7 @@ test_that("default test, dataframe columns D$A,D$B", {
9493
# context("isDefined::smk::error.message=FALSE")
9594
test_that("error.message=FALSE test, dataframe D", {
9695
res <- isDefined(ds.test_env$connections, "D", error.message = FALSE)
97-
96+
9897
expect_length(class(res), 1)
9998
expect_true(all("list" %in% class(res)))
10099
expect_length(res, 3)
@@ -116,7 +115,7 @@ test_that("error.message=FALSE test, dataframe E", {
116115

117116
test_that("error.message=FALSE test, dataframe column E$A", {
118117
# expect_error(isDefined(ds.test_env$connections, "E$A", error.message = FALSE), "The input object E$A is not defined in discordant1, discordant2, discordant3!", fixed=TRUE)
119-
expect_error(isDefined(ds.test_env$connections, "E$A", error.message = FALSE), "There are some DataSHIELD errors, list them with datashield.errors()", fixed=TRUE)
118+
expect_error(isDefined(ds.test_env$connections, "E$A", error.message = FALSE), "There are some DataSHIELD errors", fixed=TRUE)
120119

121120
err <- DSI::datashield.errors();
122121

@@ -200,7 +199,7 @@ test_that("error.message=FALSE test, dataframe columns D$A,D$B", {
200199
# context("isDefined::smk::error.message=TRUE")
201200
test_that("error.message=TRUE test, dataframe D", {
202201
res <- isDefined(ds.test_env$connections, "D", error.message = TRUE)
203-
202+
204203
expect_length(class(res), 1)
205204
expect_true(all("list" %in% class(res)))
206205
expect_length(res, 3)
@@ -215,7 +214,7 @@ test_that("error.message=TRUE test, dataframe E", {
215214

216215
test_that("error.message=TRUE test, dataframe column E$A", {
217216
# expect_error(isDefined(ds.test_env$connections, "E$A", error.message = TRUE), "The input object E$A is not defined in discordant1, discordant2, discordant3!", fixed=TRUE)
218-
expect_error(isDefined(ds.test_env$connections, "E$A", error.message = TRUE), "There are some DataSHIELD errors, list them with datashield.errors()", fixed=TRUE)
217+
expect_error(isDefined(ds.test_env$connections, "E$A", error.message = TRUE), "There are some DataSHIELD errors", fixed=TRUE)
219218

220219
err <- DSI::datashield.errors();
221220

0 commit comments

Comments
 (0)