-
Notifications
You must be signed in to change notification settings - Fork 991
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
Disable partial match warnings when running test.data.table #3664
Comments
you're correct test.data.table shouldn't interact with your personal options. could you please report which tests are failing? copy-pasting the full test.data.table() output would be fine. thanks for reporting! especially, IIUC partial match for attr is something we try to avoid internally, so you may have helped to spot some efficiency improvements as well! |
Here's what I see in my session (with lots of lines about test running elided):
|
Since R is such a dynamic and permissive language I often find it hard to spot bugs that are result of my poor typing skills. So, to help myself I set the following options, along with others, in my .Rprofile file:
options(warnPartialMatchArgs=TRUE, warnPartialMatchAttr=TRUE,warnPartialMatchDollar=TRUE)
. Recently, I have gotten interested in writing tests for R code and I was aware thatdata.table
has extensive testing so I started learning it to get a little feel for it. So, I tried running thetest.data.table()
function today. After my amazement at the thoroughness of the testing used by data.table subsided I realized that it reported that there were some errors. However, after a little bit of digging about I realized that it was from my options settings! So, is it possible to modify thetest.data.table()
function to check if these options are set before running the tests? And, it would be awesome if the function disabled these options while the tests are running and then reset the options to original ones. Just fyi, I use Patrick Burns's withOptions function to temporarily turn off these functions for running the test.data.table function.Currently, I do (using Patrick Burns's withOptions functions)
But it would be awesome if I could just do
The text was updated successfully, but these errors were encountered: