Skip to content

Commit

Permalink
add a test with several rows
Browse files Browse the repository at this point in the history
  • Loading branch information
etiennebacher committed Sep 1, 2024
1 parent f797f4f commit 522627a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tests/testthat/test-dataframe.R
Original file line number Diff line number Diff line change
Expand Up @@ -586,13 +586,19 @@ test_that("conversion of datatype Null to R works", {
data.frame(x = NA)
)

df2 = pl$DataFrame(x = 1, y = NULL)
df2 = pl$DataFrame(x = 1:2, y = NULL)
expect_identical(
df2$to_data_frame(),
data.frame(x = 1:2, y = c(NA, NA))
)

df3 = pl$DataFrame(x = 1, y = NULL)
expect_identical(
df3$to_data_frame(),
data.frame(x = 1, y = NA)
)
expect_identical(
as.data.frame(df2),
as.data.frame(df3),
data.frame(x = 1, y = NA)
)
})
Expand Down

0 comments on commit 522627a

Please sign in to comment.