Skip to content

Commit fd641e3

Browse files
committed
Adapt tests
1 parent 5c34d48 commit fd641e3

File tree

3 files changed

+2
-9
lines changed

3 files changed

+2
-9
lines changed

tests/testthat/_snaps/relational-duckdb.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# duckdb_rel_from_df() error call
1010

1111
Code
12-
as_duckdb_tibble(data.frame(a = factor(letters)))
12+
as_duckdb_tibble(data.frame(a = ordered(letters)))
1313
Condition
1414
Error in `duckdb_rel_from_df()`:
1515
! Can't convert column `a` to relational.

tests/testthat/test-dplyr-join.R

-7
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,6 @@ test_that("keys are coerced to symmetric type", {
6262
expect_type(duckplyr_inner_join(bar, foo, by = "id")$id, "character")
6363
})
6464

65-
test_that("factor keys are coerced to the union factor type", {
66-
df1 <- tibble(x = 1, y = factor("a"))
67-
df2 <- tibble(x = 2, y = factor("b"))
68-
out <- duckplyr_full_join(df1, df2, by = c("x", "y"))
69-
expect_equal(out$y, factor(c("a", "b")))
70-
})
71-
7265
test_that("keys of non-equi conditions are not coerced if `keep = NULL`", {
7366
skip_if(Sys.getenv("DUCKPLYR_FORCE") == "TRUE")
7467
foo <- tibble(id = factor(c("a", "b")), col1 = c(1, 2), var1 = "foo")

tests/testthat/test-relational-duckdb.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ test_that("duckdb_rel_from_df() and changing column names", {
5959

6060
test_that("duckdb_rel_from_df() error call", {
6161
expect_snapshot(error = TRUE, {
62-
as_duckdb_tibble(data.frame(a = factor(letters)))
62+
as_duckdb_tibble(data.frame(a = ordered(letters)))
6363
})
6464
})
6565

0 commit comments

Comments
 (0)