tests/testthat/test_format_csvy.R

test_that("Export to and import from CSVY", {
    withr::with_tempfile("iris_file", fileext = ".csvy", code = {
        suppressWarnings(export(iris, iris_file))
        expect_true(file.exists(export(iris, iris_file)))
        suppressWarnings(d <- import(iris_file))
        expect_true(is.data.frame(d))
    })
})

Try the rio package in your browser

Any scripts or data that you put into this service are public.

rio documentation built on June 22, 2024, 9:48 a.m.