-
Notifications
You must be signed in to change notification settings - Fork 314
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
running via Rscript fails #32
Comments
Failure with Rscript but not R, usually indicates that I've forgotten to declare a base R package dependency. |
Seems to be something to do with ReferenceClasses... $ Rscript -e "library(testthat); library(methods); SummaryReporter$new" whereas the same in an interactive session prints out a class method definition. But I can't see any difference in the sessionInfo() between the two cases, arrgh |
It works with
|
Oh, except that methods is missing, and order seems to matter:
|
I think this bug is still live. I've I run auto test via testthat will run the tests initially just fine. If I change the source documents, the tests are properly restarted and run. However, when I change a test file, I get:
While not necessarily the cleanest test case, you can run my tests via:
|
I'm still having this bug with R 2.15.0 and testthat 0.6. when running a script via Rscript
With a simple tests.R using test_dir():
+1 to reopen the issue. |
@xuanxu - you need the development version from github. @markmfredrickson - that sounds like a different bug (which I'm pretty sure I've also fixed) |
Confirmed. Thanks! |
Thanks @hadley, is there a new version release planned anytime soon? |
Yes, hopefully in the next week or two. |
This script (rscript_test.R):
works when sourced or run in batch mode:
But fails when run via Rscript:
Similar scripts with a test_dir() have failed with a slightly more useful errors:
The text was updated successfully, but these errors were encountered: