Skip to content

Test every report and chat command; fix first-run crashes - #16

Merged
robdevops merged 4 commits into
mainfrom
claude/kind-newton-ad0z2q
Oct 7, 2026
Merged

robdevops merged 4 commits into
mainfrom
claude/kind-newton-ad0z2q

Conversation

@robdevops

Copy link
Copy Markdown
Owner
  • tests/common.py: shared mocked fixture (no network)
  • tests/test_reports.py: every chat command, chart, prepare_* function, cron report and podcast helper
  • tests/test_finbot.py: plumbing checks (chunking, timezones, WSGI handler)
  • Fixes found by the tests: .price top with no period, rating.py unbound emoji, trades.py and .watchlist crashing when their state file doesn't exist yet

🤖 Generated with Claude Code

https://claude.ai/code/session_01JVEkZofdPjQ4jtXFKipeUX


Generated by Claude Code

claude added 4 commits October 7, 2026 01:16
…ound

- tests/common.py: shared mocked fixture (no network); test_reports.py covers each chat command,
  chart, prepare_* function, cron report and podcast helper; test_finbot.py keeps plumbing checks
- fix .price top with no period (date_range_english(None)), rating.py unbound emoji when nothing
  changed, trades.py and .watchlist crashing when their state file does not exist yet

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JVEkZofdPjQ4jtXFKipeUX
…no period (defaults to 7 days)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JVEkZofdPjQ4jtXFKipeUX
…s they found

- tests/test_providers.py: Yahoo quote/detail/chart and Sharesight portfolios/trades/performance parsed from doc/ samples,
  plus HTTP errors, retries, exclusions, Telegram send failures and error reporting
- tests/test_util.py: table-driven helper tests; tests/test_edges.py: empty/broken upstream data, bad arguments, rejected requests
- every command test now asserts the worker did not report a crash
- fixes: yahoo.fetch returned None (callers iterate), fetch_detail TypeError on result=null,
  util.get_holdings_and_watchlist crashed with no watchlist file, .marketcap with no data

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JVEkZofdPjQ4jtXFKipeUX
…ed labels on zoomed charts

- tests/test_charts.py: 1280x800, not blank, nothing on the image edge; blue/red by sign, row order, titles, report sort order;
  one tolerant golden image per chart type (UPDATE_GOLDEN=1 to refresh)
- fix: zoomed bar charts (.buy/.sell ratings) with few rows or wide labels drew their labels over the left edge of the image

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JVEkZofdPjQ4jtXFKipeUX
@robdevops
robdevops force-pushed the claude/kind-newton-ad0z2q branch from df59a69 to ce98beb Compare October 7, 2026 05:01
@robdevops
robdevops merged commit db1f33c into main Oct 7, 2026
2 checks passed
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.

2 participants