Skip to content

Commit 558bd72

Browse files
committed
fix: test and adds extra protection on qenv validation
1 parent 5c0ef7d commit 558bd72

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

R/qenv-class.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ setValidity("qenv", function(object) {
4949
"@code and @messages slots must have the same length"
5050
} else if (any(duplicated(object@id))) {
5151
"@id contains duplicated values."
52+
} else if (!environmentIsLocked(object@.xData)) {
53+
"@.xData must be locked."
5254
} else {
5355
TRUE
5456
}

tests/testthat/test-qenv_join.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ testthat::test_that("Joining two identical qenvs outputs the same object", {
33
q2 <- q1
44

55
testthat::expect_true(.check_joinable(q1, q2))
6-
q <- join(q1, q2)
6+
q <- c(q1, q2)
77

88
testthat::expect_equal(q@.xData, q1@.xData)
99
testthat::expect_identical(q@code, "iris1 <- iris")

0 commit comments

Comments
 (0)