Skip to content
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

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

Closed
dlebauer opened this issue Jul 30, 2014 · 1 comment
Closed

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

dlebauer opened this issue Jul 30, 2014 · 1 comment

Comments

@dlebauer
Copy link
Contributor

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)

@dlebauer dlebauer changed the title auto_test_package fails tests in tests/testthat/ auto_test_package fails when tests are in tests/testthat/ Jul 30, 2014
@hadley
Copy link
Member

hadley commented Sep 17, 2014

I think auto_test_package() needs to be rewritten to use devtools::load_all().

@hadley hadley closed this as completed in e3353f7 Sep 17, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants