Suggestion - Improving Unit Tests for Pre-Release Assessments in yfinance #2295
RavenTress
started this conversation in
Development
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The yfinance library frequently experiences breaking changes every few weeks/months. These issues often arise due to upstream modifications in Yahoo Finance’s API, data formatting changes, or internal library updates. Robust unit tests are necessary to detect these issues before pushing releases.
Expand Test Coverage
Add mocked responses to cover edge cases such as missing fields, NaN values, and API throttling.
Include integration tests that verify real-world data parsing with controlled test cases.
Validate multiple ticker types (e.g., stocks, ETFs, indices, and forex pairs).
Pre-Release Regression Suite
Introduce a pre-release test suite that runs comprehensive validation across historical and real-time data.
Ensure consistency checks between previous and current API responses.
Automated Data Integrity Checks
Compare historical vs. live data for discrepancies.
Verify column schema stability (prevent silent format changes).
Test against a static reference dataset (expected values).
And much more --
Beta Was this translation helpful? Give feedback.
All reactions