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

Handle non-string boundaries and add test cases for BaseMapper class #2

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

Conversation

Munanom
Copy link
Owner

@Munanom Munanom commented Mar 24, 2024

Bugfix: handle non-string boundary inputs

  • Add a check to ensure the boundary value is a string before attempting string operations
  • Raise a ValueError with an appropriate error message when boundary is not a string
  • This change prevents a TypeError from being raised when trying to process non-string boundary values

@Munanom
Copy link
Owner Author

Munanom commented Mar 24, 2024

Add test cases for BaseMapper class

  • Add test_reading_geojson_and_loading_boundary to verify GeoJSON reading and boundary loading
  • Add test_create_basemap_and_tiles to test basemap and tile creation
  • Add test_load_boundary_with_bbox to test loading boundary with BBOX strings
  • Add test_invalid_boundaries to test various invalid boundary inputs
  • Add test_custom_tilemap_service to test customization of tilemap service
  • Add test_imagery_sources to verify different imagery basemap sources
  • Refactor existing test_create function into separate test cases
  • Update imports and setup/teardown methods for testing

Draft testcases
Fixes: hotosm#203

@Munanom Munanom closed this Mar 24, 2024
@Munanom Munanom reopened this Mar 24, 2024
@Munanom Munanom changed the title Fix type error when processing non-string boundaries Handle non-string boundaries and add test cases for BaseMapper class Mar 25, 2024
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.

1 participant