Open kurtawirth opened 6 years ago
@kurtawirth Please enumerate each test you’d like to see implemented at this stage as a separate issue, or within an issue.
On Fri, May 11, 2018 at 14:44 Kurt Wirth notifications@github.com wrote:
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/kurtawirth/botscan/issues/5, or mute the thread https://github.com/notifications/unsubscribe-auth/ACFxUT0sZPN_rg4_q8fSECZc8g_-pZLFks5txdwngaJpZM4T75X6 .
--
Ryan T. Moore www.ryantmoore.org
This needs to be edited, as compiling version 2.0.1 produces an error in the test.
bom
ErrorI edited tests/testthat/test.expectednumbers.R
(now called test_validoutput.R
) to be a valid set of small tests in commit 79f5fd5. However, it relies on a call to botscan()
, which relies on creating the bom
object in the workspace with setup_botscan()
. Because of the environment the tests are run in, even if I have a valid bom
in my working directory, the test does not use it.
When I devtools::check()
the package, this test-related error appears:
Starting user account checking
<simpleError in doTryCatch(return(expr), name, parentenv, handler): object 'bom' not found>
We could include a sample dataset in the package on which the test (and other function demos) could be run. @kurtawirth, your thought?
Good idea. Will work with you to make this happen.
Using the sampleData.RData
that you sent along, @kurtawirth, I've implemented this, after changing the name to test_object.RData
. I followed http://r-pkgs.had.co.nz/data.html, under "Other data", where Wickham notes
Data for tests: it’s ok to put small files directly in your test directory. But remember unit tests are for testing correctness, not performance, so keep the size small.
Placing test_object.RData
in tests/testthat/
, and adding load("test_object.RData")
to test_validoutput.R
devtools::test()
, butdevtools::check()
.To do/answer?
devtools::check()
(e.g.) now returns a note about depending on R 3.5.0, as a result of this object.
To include "equal to or greater than" 1 and 0.