test: expand normalize test coverage for all source types#147
Open
JiayuuWang wants to merge 1 commit intomvanhorn:mainfrom
Open
test: expand normalize test coverage for all source types#147JiayuuWang wants to merge 1 commit intomvanhorn:mainfrom
JiayuuWang wants to merge 1 commit intomvanhorn:mainfrom
Conversation
The normalize module had tests only for Reddit and X items, leaving filter_by_date_range and six source normalizers (YouTube, TikTok, Instagram, HackerNews, Bluesky, TruthSocial, Polymarket) entirely uncovered. This adds 25 new tests covering: - filter_by_date_range: in-range, before/after range, boundary dates, unknown date handling with/without require_date - normalize_youtube_items: basic fields, engagement, missing engagement - normalize_tiktok_items: basic fields, sequential TK-IDs, engagement/shares - normalize_instagram_items: basic fields, engagement - normalize_hackernews_items: basic fields, engagement, top_comments - normalize_bluesky_items: basic fields, engagement including quotes - normalize_truthsocial_items: basic fields, engagement - normalize_polymarket_items: basic fields, volume1mo preference over volume24hr, volume24hr fallback Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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
test_normalize.pypreviously covered onlynormalize_reddit_items,normalize_x_items, anditems_to_dicts— leavingfilter_by_date_rangeand six source normalizers with zero test coverage.normalize.py.What's covered
filter_by_date_rangenormalize_youtube_itemsnormalize_tiktok_itemsnormalize_instagram_itemsnormalize_hackernews_itemsnormalize_bluesky_itemsnormalize_truthsocial_itemsnormalize_polymarket_itemsvolume1mopreference overvolume24hr,volume24hrfallbackTest plan
python -m pytest tests/test_normalize.py— 31 passed (was 6)python -m pytest tests/— full suite passes with no regressions🤖 Generated with Claude Code