Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upensure inheritanceDT is nonempty before doing comparison. Fixes #256 #262
Conversation
Codecov Report
@@ Coverage Diff @@
## master #262 +/- ##
=======================================
Coverage 92.44% 92.44%
=======================================
Files 12 12
Lines 927 927
=======================================
Hits 857 857
Misses 70 70
Continue to review full report at Codecov.
|
|
@TylerGrantSmith thanks for the fix, looks good to me! I'm guessing this showed up for you as an error like
Would you be willing to add a unit test that reproduces this situation, so that we can be sure we don't reintroduce the bug? |
|
@jameslamb I got the same error that was originally listed in #256 I will see what I can do about the unit test. I have never made a test for an R6 method, so I will try to base it off what you all have done in the other tests. |
|
I think the way to test this is to have some class A's method depend on an inherited class B's method, where class B is in a different package. I feel like this may end up being a somewhat involved test to write (we'd need two test packages? or make a new test package depend on an existing test package?), so feel free to open an issue about it to capture the need, and we can just merge this PR as is so it's not blocked. |
I agree, and that is why I haven't worked on the test yet. It does raise a methodological question for me though. If you were to take the latter path and modify an existing test package, what checks are there to guarantee it doesn't "break" the tests it was originally designed for. For example, with with the |
|
@TylerGrantSmith I've opened #265 to document this missing test. Let's move the discussion there. Thanks for your PR! |
Just added a simple row count check before comparing data table values. Otherwise the result of the
data.tablecommand isNA