Skip to content

Commit

Permalink
Better test assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
nealrichardson committed Oct 12, 2022
1 parent 9c89929 commit 44d50d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions r/tests/testthat/test-dplyr-slice.R
Original file line number Diff line number Diff line change
Expand Up @@ -116,15 +116,15 @@ test_that("slice_sample, ungrouped", {
slice_sample(prop = .2) %>%
collect() %>%
nrow()
expect_true(sampled_n <= 2)
expect_lte(sampled_n, 2)

# Test with dataset, which matters for the UDF HACK
sampled_n <- tab %>%
InMemoryDataset$create() %>%
slice_sample(prop = .2) %>%
collect() %>%
nrow()
expect_true(sampled_n <= 2)
expect_lte(sampled_n, 2)
})

test_that("slice_* not supported with groups", {
Expand Down

0 comments on commit 44d50d2

Please sign in to comment.