🧪 [testing improvement] Add unit tests for resolve_url_template#45
🧪 [testing improvement] Add unit tests for resolve_url_template#45tahamukhtar20 wants to merge 1 commit into
Conversation
This commit adds comprehensive unit tests for the `resolve_url_template` function in `src/mapcv/downloader.py`. The tests cover the following scenarios: - Explicit URL template usage. - Built-in source resolution (e.g., "osm"). - Precedence of explicit templates over built-in sources. - Error handling for unknown source names. - Error handling for missing required arguments. These tests ensure that tile URL resolution remains reliable as new sources are added or the logic is refactored. Co-authored-by: tahamukhtar20 <91777330+tahamukhtar20@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
🎯 What: The testing gap addressed
The
resolve_url_templatefunction insrc/mapcv/downloader.pywas previously untested. This function is responsible for determining the final tile URL template used for downloading satellite imagery, making it a critical component of the downloading pipeline.📊 Coverage: What scenarios are now tested
url_templatereturns it as-is.source(like"osm") correctly resolves to its predefined URL.url_templatetakes priority if both it and asourceare provided.ValueErrorwhen an unknownsourceis provided or when both arguments areNone.✨ Result: The improvement in test coverage
Unit test coverage for the
downloader.pymodule has been increased, specifically securing the logic for tile source resolution against regressions.PR created automatically by Jules for task 104259651370416581 started by @tahamukhtar20