test(darksky): improve test coverage from 53% to 90%#2
Closed
Conversation
Addresses #1 - Added comprehensive tests for: - TwilightType.sun_angle_range property - DarkSkyWindow.time_until_darkness() all code paths - DarkSkyWindow.time_remaining() all code paths - DarkSkyWindow.__str__() 'no data' edge case - get_twilight_type() all return values - DarkSkyClient async wrapper methods - get_dark_sky_window() non-polar missing twilight data Coverage: 53% → 90% (exceeds 80% target)
bc5825d to
c620cd8
Compare
Owner
Author
|
Closing as superseded by #3 which achieved 100% coverage. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Improves test coverage for
darksky.pyfrom 53% to 90%, exceeding the 80% target from #1.Tests Added
TwilightType Tests
sun_angle_rangeproperty for all twilight typesDarkSkyWindow Tests
time_until_darkness()- all code paths (before darkness, during darkness, no data)time_remaining()- all code paths (before, during, after darkness, no data)__str__()- 'no data available' edge caseFunction Tests
get_twilight_type()- all return values (DAY, CIVIL, NAUTICAL, ASTRONOMICAL, NIGHT)get_dark_sky_window()- non-polar latitude with missing twilight dataDarkSkyClient Async Tests
get_dark_sky_window()async wrapperis_astronomical_darkness()async wrapperclose()async no-opCoverage Results
Closes #1