Skip to content

Commit

Permalink
test: use more specific expectations for class
Browse files Browse the repository at this point in the history
  • Loading branch information
maelle committed Sep 30, 2024
1 parent 171f5da commit 1bc3285
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/testthat/test-cetesb_retrieve_met_pol.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ test_that("cetesb_retrieve_met_pol works!", {
expect_gt(param_means["pm25"], 7)

# Testing data.frame classes
expect_equal(TRUE, "data.frame" %in% class(pinheiros))
expect_s3_class(pinheiros, "data.frame")
expect_type(pinheiros$tc, "double")
# but probably better
# expect_setequal(unname(apply(pinheiros, 2, class)), c(<vector-of-classes>))
expect_equal(TRUE, "numeric" %in% class(pinheiros$tc))
expect_equal(TRUE, "numeric" %in% class(pinheiros$rh))
expect_equal(TRUE, "numeric" %in% class(pinheiros$ws))
Expand Down

0 comments on commit 1bc3285

Please sign in to comment.