Skip to content

Commit

Permalink
Add failing test for #122
Browse files Browse the repository at this point in the history
  • Loading branch information
gaborcsardi committed Feb 16, 2025
1 parent 6ba02ca commit a444469
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tests/testthat/test-write-parquet-4.R
Original file line number Diff line number Diff line change
Expand Up @@ -435,4 +435,12 @@ test_that("argument errors", {
write_parquet(mtcars, 1:10)
write_parquet(mtcars, letters)
})
})
})

test_that("edge case: empty dict", {
tmp <- tempfile(fileext = ".parquet")
on.exit(unlink(tmp), add = TRUE)
df <- data.frame(address_id = c(NA_integer_, NA_integer_, NA_integer_))
write_parquet(df, tmp)
expect_equal(as.data.frame(read_parquet(tmp)), df)
})

0 comments on commit a444469

Please sign in to comment.