Skip to content

Commit

Permalink
Add test for Artifact$from_df()
Browse files Browse the repository at this point in the history
  • Loading branch information
lazappi committed Nov 15, 2024
1 parent e6a2792 commit 62540e6
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/testthat/test-Artifact.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
skip_if_offline()

test_that("creating an artifact from a data frame works", {
skip_if_not_installed("reticulate")
skip_if_not(reticulate::py_available("lamindb"))

local_setup_lamindata_instance()

db <- connect()

dataframe <- data.frame(
Description = "laminr test data frame",
Timestamp = Sys.time()
)

new_artifact <- db$Artifact$from_df(
dataframe, description = dataframe$Description
)

expect_s3_class(new_artifact, "TemporaryArtifact")
})

0 comments on commit 62540e6

Please sign in to comment.