-
Notifications
You must be signed in to change notification settings - Fork 5
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
What does test_name
equal NA
mean?
#48
Comments
N.B. above I'm testing the CRAN version |
Thanks @vgherard - that library (r2r)
rd <- tools::Rd_db ("r2r")
rd <- rd [grep ("^hashtable\\.Rd$", names (rd))]
ex <- tools:::.Rd_get_metadata (rd [[1]], "examples")
print (strsplit (ex, "\n"))
#> [[1]]
#> [1] "m <- hashmap("
#> [2] ""
#> [3] " list(\"foo\", 1),"
#> [4] ""
#> [5] " list(\"bar\", 1:5),"
#> [6] ""
#> [7] " list(data.frame(x = letters, y = LETTERS), \"baz\")"
#> [8] ""
#> [9] " )"
#> [10] ""
#> [11] "m[[ data.frame(x = letters, y = LETTERS) ]]"
#> [12] ""
#> [13] ""
#> [14] ""
#> [15] "# Set of character keys, case insensitive."
#> [16] ""
#> [17] "s <- hashset(\"A\", \"B\", \"C\", key_preproc = tolower)"
#> [18] ""
#> [19] "s[[\"a\"]]" Running that example exactly as specified is okay: hashmap (list ("foo", 1),
list ("bar", 1:5),
list (data.frame (x = letters, y = LETTERS), "baz"))
#> An r2r hashmap. These are the parameters of the function:
And hashmap (... = list ("foo", 1),
list ("bar", 1:5),
list (data.frame (x = letters, y = LETTERS), "baz"))
#> An r2r hashmap. But attempting to name the second parameter triggers this error: hashmap (... = list ("foo", 1),
hash_fn = list ("bar", 1:5),
list (data.frame (x = letters, y = LETTERS), "baz"))
#> Error: 'hash_fn' must be a function. Created on 2021-07-16 by the reprex package (v2.0.0.9000) Because an error is triggered by normal usage as shown in the example, there is no named test associated. I'll clarify in this point in the documentation to avoid future confusion. My Q for you: Does this make sense in the context of your This in essence comes down to an unwritten convention that
Neither |
Thanks @mpadge for the detailed reply, I see the problem.
It looks exactly like this. In my package, this is purely intentional: calls to
The general rule of thumb makes a lot of sense, for sure. However, I think the present use case in Thanks, |
Yes, indeed, that could be done. The entire parsing routines are going to be restructured, or more accurately removed to be replaced by a much more efficient approach to identifying input types of each parameter. That will change a lot of this anyway, so I'll first wait for that before returning to this point, but will definitely leave it open to address it asap. Thanks! |
Hi, I'm trying
autotest::autotest_package()
on my own packager2r
and am getting the following results:Created on 2021-07-16 by the reprex package (v2.0.0)
What does the
NA
test name mean? I've tried to search the documentation and find no special mention.Thanks,
Valerio.
The text was updated successfully, but these errors were encountered: