Skip to content

Commit 46f6ca8

Browse files
committed
test for assignment
1 parent 605ef1b commit 46f6ca8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

R/pkg/inst/tests/testthat/test_sparkSQL.R

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1022,6 +1022,11 @@ test_that("select operators", {
10221022
"Subset index has length > 1. Only the first index is used.")
10231023
expect_is(suppressWarnings(df[[c("name", "age")]]), "Column")
10241024

1025+
expect_warning(df[[1:2]] <- df[[1]],
1026+
"Subset index has length > 1. Only the first index is used.")
1027+
expect_warning(df[[c("name", "age")]] <- df[[1]],
1028+
"Subset index has length > 1. Only the first index is used.")
1029+
10251030
expect_is(df[, 1, drop = F], "SparkDataFrame")
10261031
expect_equal(columns(df[, 1, drop = F]), c("name"))
10271032
expect_equal(columns(df[, "age", drop = F]), c("age"))

0 commit comments

Comments
 (0)