Add a unit test for join method coverage #630
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
[O] Wrote test for feature
[ ] Added changes to CHANGELOG.md
[ ] Bumped version number (delete if unneeded)
Changes proposed:
Hello, I'm a student and a first-time contributor.
One of the coverage missing in 'tables.py' is in the '_join' internal method, in lines 2039-2040 where it checks for an empty table. However, the 'join' method for external interface already has these checks in lines 2024-2025, preventing those lines from being covered. This makes it difficult to test '_join' by just calling 'join' as discussed in this PR.
In this unit test, I decided to modify the 'join' method to skip those checks and allow '_join' to be covered. This way, the functionality of _join can be tested without directly invoking it.
Please let me know if any changes are needed to improve this implementation.