tests/testthat/test-io-csv.R

test_that("Roundtrip to CSV works", {
  local_options(lifecycle_verbosity = "quiet")

  df <- tibble(a = 1:3, b = letters[4:6])

  path_csv <- withr::local_tempfile(fileext = ".csv")

  write.csv(df, path_csv, row.names = FALSE)
  out <- df_from_csv(path_csv)

  expect_equal(out, df)
})
duckdblabs/duckplyr documentation built on June 13, 2025, 1:59 p.m.