Skip to content
This repository was archived by the owner on Apr 12, 2026. It is now read-only.

test: improve meteor API test coverage from 72% to ~99% - #5

Merged
Orinks merged 1 commit into
mainfrom
improve-meteors-briefing-coverage
Feb 6, 2026
Merged

test: improve meteor API test coverage from 72% to ~99%#5
Orinks merged 1 commit into
mainfrom
improve-meteors-briefing-coverage

Conversation

@Orinks

@Orinks Orinks commented Feb 6, 2026

Copy link
Copy Markdown
Owner

Summary

Adds 22 new tests to tests/test_meteor_api.py improving coverage for src/accessisky/api/meteors.py from 72% to approximately 99%.

New tests cover:

  • MeteorShower.activity_days property: year-spanning showers, default fallback
  • MeteorShowerInfo.viewing_rating: all rating branches (Excellent, Good, Fair, Poor) at various distances from peak
  • MeteorShowerInfo.str: peak tonight, peak in future, peak passed
  • _get_activity_range helper: explicit dates, year boundary spanning, default (no dates)
  • get_upcoming_showers/get_active_showers: default parameter handling
  • get_active_showers: year-boundary peak adjustment (next year peak closer)
  • get_shower_info: default year, partial name matching
  • MeteorClient: all async interface methods

Test results

  • All 307 tests pass (39 in meteor tests)
  • Lint clean (ruff check . passes)

Add 22 new tests covering:
- MeteorShower.activity_days property (year-spanning, default)
- MeteorShowerInfo viewing_rating branches (Excellent/Good/Fair/Poor)
- MeteorShowerInfo __str__ branches (peak tonight/future/passed)
- _get_activity_range helper (with dates, year-spanning, default)
- get_upcoming_showers/get_active_showers default parameters
- get_active_showers year-boundary peak adjustment
- get_shower_info default year and partial matching
- MeteorClient async interface (all methods)
@Orinks
Orinks merged commit 0d90e5e into main Feb 6, 2026
8 of 9 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant