Skip to content

update to testthat 3e + consolidate translate() tests #699

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 31 commits into from
Apr 20, 2022
Merged
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
0dc7e88
bump testthat version
simonpcouch Apr 5, 2022
96d2be8
drop calls to `context()`
simonpcouch Apr 5, 2022
80bd6e7
remove usage of `expect_equivalent()`
simonpcouch Apr 6, 2022
fff68e3
favor `expect_equal` args over ad-hoc deattr
simonpcouch Apr 6, 2022
1eacf15
drop calls to `source`, standardize header
simonpcouch Apr 6, 2022
06b8c8f
drop `library` calls, namespace w `::` when needed
simonpcouch Apr 6, 2022
02ac406
drop `new_empty_quosure()`
simonpcouch Apr 6, 2022
c1b9613
add `test_translate` skeleton, spec out with `linear_reg`
simonpcouch Apr 6, 2022
264c1ec
add helper for `expect_snapshot`ting translate `args`
simonpcouch Apr 6, 2022
ffeaa38
adjust layout of `test_translate.R`
simonpcouch Apr 6, 2022
483cf03
condense primary arguments testing
simonpcouch Apr 6, 2022
c8297e2
refactor engine arguments tests
simonpcouch Apr 7, 2022
cc6bb34
`expect_warning` -> `expect_snapshot` when `regex` arg present
simonpcouch Apr 7, 2022
ebeda89
revert cc6bb34
simonpcouch Apr 7, 2022
f318779
`expect_output` -> `expect_snapshot`
simonpcouch Apr 7, 2022
97b9f13
revert to simpler expectation
simonpcouch Apr 7, 2022
3df21e7
add snaps
simonpcouch Apr 7, 2022
e661720
misc bug fixes
simonpcouch Apr 7, 2022
1edd621
adjust helper interface
simonpcouch Apr 7, 2022
553ca9b
make envs reproducible, update snaps
simonpcouch Apr 8, 2022
fd154dd
small `r cmd check` fixes
simonpcouch Apr 8, 2022
67e0ed8
Merge branch 'main' into 3e
simonpcouch Apr 8, 2022
d7b7e1b
typo fix
simonpcouch Apr 8, 2022
1c3eccd
Merge branch '3e' of https://github.com/tidymodels/parsnip into 3e
simonpcouch Apr 8, 2022
e377195
invoke `lung` outside of test body
simonpcouch Apr 11, 2022
b9fb226
load `lung` data conditionally
simonpcouch Apr 11, 2022
3673a4a
transition `$fit` to `extract_fit_*()`
simonpcouch Apr 13, 2022
31df3ed
transition `update()` tests to snapshots
simonpcouch Apr 15, 2022
d16ddbd
transition last bits of `rlang` nastiness to `expect_snapshot()`
simonpcouch Apr 15, 2022
bb2ad5d
revert to `quo` for ignoring env
simonpcouch Apr 15, 2022
2d6d66f
drop outdated snapshot
simonpcouch Apr 20, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Suggests:
rpart,
sparklyr (>= 1.0.0),
survival,
testthat,
testthat (>= 3.0.0),
xgboost (>= 1.5.0.1)
VignetteBuilder:
knitr
Expand Down Expand Up @@ -89,4 +89,5 @@ Config/rcmdcheck/ignore-inconsequential-notes: true
Encoding: UTF-8
LazyData: true
Roxygen: list(markdown = TRUE)
Config/testthat/edition: 3
RoxygenNote: 7.1.2.9000
20 changes: 20 additions & 0 deletions tests/testthat/_snaps/rand_forest_ranger.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# argument checks for data dimensions

Code
f_fit <- spec %>% fit(body_mass_g ~ ., data = penguins)
Condition
Warning:
1000 columns were requested but there were 6 predictors in the data. 6 will be used.
Warning:
1000 samples were requested but there were 333 rows in the data. 333 will be used.

---

Code
xy_fit <- spec %>% fit_xy(x = penguins[, -6], y = penguins$body_mass_g)
Condition
Warning:
1000 columns were requested but there were 6 predictors in the data. 6 will be used.
Warning:
1000 samples were requested but there were 333 rows in the data. 333 will be used.

Loading