Skip to content

Commit

Permalink
fix unit-test failures
Browse files Browse the repository at this point in the history
  • Loading branch information
johnkerl committed Oct 3, 2024
1 parent 89210b5 commit 3f1a3f0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions apis/r/R/SOMADataFrame.R
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,10 @@ SOMADataFrame <- R6::R6Class(
is.data.frame(values) || is_arrow_table(values) || is_arrow_record_batch(values)
)

# Leave state unmodified
# TODO: this issue will automatically go away on https://github.com/single-cell-data/TileDB-SOMA/issues/3059
on.exit(self$reopen(mode = "WRITE"))

if (is.data.frame(values)) {
if (!is.null(row_index_name)) {
stopifnot(
Expand Down
1 change: 1 addition & 0 deletions apis/r/tests/testthat/test-SOMADataFrame.R
Original file line number Diff line number Diff line change
Expand Up @@ -745,6 +745,7 @@ test_that("SOMADataFrame can be updated", {
)
tbl0 <- tbl1


# Error on incompatible schema updates
tbl0$string_column <- tbl0$string_column$cast(target_type = arrow::int32()) # string to int
expect_error(
Expand Down

0 comments on commit 3f1a3f0

Please sign in to comment.