You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Nicola Crane (Jira)" <ji...@apache.org> on 2022/01/13 15:20:00 UTC
[jira] [Commented] (ARROW-15301) [R] Discussion: move testthat test helpers to R/test-helpers.R
[ https://issues.apache.org/jira/browse/ARROW-15301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17475445#comment-17475445 ]
Nicola Crane commented on ARROW-15301:
--------------------------------------
Actually, on the basis of the fact that {{devtools::load_all()}} would load them, I now think this is a great idea to move them into the R directory; I've had multiple moments when testing that I've had to manually go load them and it'd be nice to not have to do that.
> [R] Discussion: move testthat test helpers to R/test-helpers.R
> --------------------------------------------------------------
>
> Key: ARROW-15301
> URL: https://issues.apache.org/jira/browse/ARROW-15301
> Project: Apache Arrow
> Issue Type: Improvement
> Components: R
> Reporter: Dragoș Moldovan-Grünfeld
> Priority: Major
> Fix For: 8.0.0
>
>
> Would it make sense to have all custom expectations in {{R/}} , maybe {{R/test-helpers.R}} ? Reasons:
>
> * edit(added on 12/01/2022): probably the most important point is these files are source by {{devtools::load_all()}} and, thus, helper functions are available interactively.
> * easier for newbies to read a file and figure out what custom testthat helpers we have
> * easier to document
> * respects the testthat author's suggestion to have them there
> Currently we have 17 different custom expectations, all defined in different files.
> A follow-up thought: maybe move all helpers there ({{{}is.{}}}, {{{}as_{}}}, {{{}compare_{}}}, {{verify}} etc).
--
This message was sent by Atlassian Jira
(v8.20.1#820001)