Skip to content

auto_test_package fails when tests are in tests/testthat/ #151

Closed
@dlebauer

Description

@dlebauer

auto_test_package() does not work with new recommended practice of using tests/testthat from the advanced R book

example:

$ git clone git@github.com:hadley/plyr ## uses inst/tests/ and works
$ R
> testthat::auto_test_package("plyr")
> q()
$ mkdir plyr/tests/testthat/
$ mv plyr/inst/tests/* plyr/tests/testthat/
$ R
> testthat::auto_test_package("plyr")

gives error:

Error in digest(path, file = TRUE) : 
  The specified pathname is not a file: /home/dlebauer/dev/plyr/tests/testthat

While I am at it - unless there is a reason not to , it would be convenient / intuitive if the default path for auto_test_package() were "." to be consistent with the devtools function test() (unless there is a reason not to have a default)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions