Skip to content

tests: FinnhubProvider coverage — stock, forex, _parse, error handling#2

Merged
FaustoS88 merged 1 commit intomainfrom
feat/finnhub-tests
Mar 14, 2026
Merged

tests: FinnhubProvider coverage — stock, forex, _parse, error handling#2
FaustoS88 merged 1 commit intomainfrom
feat/finnhub-tests

Conversation

@FaustoS88
Copy link
Copy Markdown
Owner

Adds pytest coverage for FinnhubProvider:

  • _to_forex_symbol() — OANDA format conversion for all major pairs
  • supports() — stocks, indices (^SPX), intl exchange-suffixed, forex, negative cases
  • fetch() — stock happy path (values, limit, all intervals), forex routing to OANDA format
  • routing guard — stock path never calls forex_candles, forex path never calls stock_candles
  • fetch() error cases — unsupported interval (4h), missing API key, no-data status, client exception, None response
  • _parse() — sync unit tests: candle values, limit enforcement, missing volume field, None input, empty timestamps

33 tests total. All passing on Python 3.11 and 3.12.

@FaustoS88 FaustoS88 merged commit 39c24ee into main Mar 14, 2026
4 checks passed
@FaustoS88 FaustoS88 deleted the feat/finnhub-tests branch March 14, 2026 09:33
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.

1 participant