Skip to content
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

Add two unit tests for join method #615

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

vvedenskaya
Copy link

Added two unit tests to improve the test coverage of the join method in test_tables.py

@vvedenskaya
Copy link
Author

vvedenskaya commented Oct 3, 2024

Please review!

@@ -44,6 +44,7 @@ def test_setup_map():
'width': 960,
'height': 500,
'features': [],
'attr':'Map tiles by Stamen Design, CC BY 3.0 - Map data © OpenStreetMap'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not needed, please remove

@@ -56,6 +57,7 @@ def test_setup_map():
ds.Marker(51.514, -0.139),
ds.Marker(51.519, -0.132)
]),
'attr':'Map tiles by Stamen Design, CC BY 3.0 - Map data © OpenStreetMap'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not needed, please remove

@@ -1660,6 +1665,21 @@ def test_join_without_other_label(table, table2):
2 | c | 3 | two
""")

def test_join_with_empty_table(table, empty_table):
result = empty_table._join('points', table)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While I think you're testing the right things - testing the internal methods (denoted with the underscore at the beginning) is not a standard practice. I think this could be a good PR if you did these same tests using the "join" method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants