Skip to content

Commit 9227e7e

Browse files
Fix test
1 parent 4d8bb46 commit 9227e7e

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

r/tests/testthat/helper-parquet.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
# specific language governing permissions and limitations
1616
# under the License.
1717

18-
expect_parquet_roundtrip <- function(tab, ..., as_data_frame = FALSE) {
18+
expect_parquet_roundtrip <- function(tab, ...) {
1919
tf <- tempfile()
2020
on.exit(unlink(tf))
2121

2222
write_parquet(tab, tf, ...)
23-
expect_equal(read_parquet(tf, as_data_frame = as_data_frame), tab)
23+
expect_equal(read_parquet(tf, as_data_frame = FALSE), tab)
2424
}

r/tests/testthat/test-parquet.R

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,10 @@ test_that("Factors are preserved when writing/reading from Parquet", {
113113
chr <- c("a", "b")
114114
df <- tibble::tibble(fct = fct, ord = ord, chr = chr)
115115

116-
expect_parquet_roundtrip(df)
117-
expect_parquet_roundtrip(df, as_data_frame = FALSE)
116+
pq_tmp_file <- tempfile()
117+
on.exit(unlink(pq_tmp_file))
118+
119+
write_parquet(df, pq_tmp_file)
120+
df_read <- read_parquet(pq_tmp_file)
121+
expect_identical(df, df_read)
118122
})

0 commit comments

Comments
 (0)