-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support daily only or intraday only intervals
To `prices.base.PricesBase`: - removes all dependence on either daily or intraday intervals being defined (i.e. can now define one or the other or both). - revises `get` implementation to raise new errors `PricesDailyIntervalError` / `PricesIntradayIntervalError` when request requires daily / intraday data although daily / intraday intervals are not defined for the prices subclass. - `session_prices` and `close_at` now raise new `MethodUnavailableNoDailyInterval` error if no daily interval defined. - `price_at` revised to raise errors in possible edge cases where daily data required although daily interval not defined. - adds verification that subclass defines base intervals and limits. Tests: - tests added to `test_base_prices` to ensure `get` directly raising errors when daily / intraday prices requested although daily / intraday interval not defined. Fixtures revised to provide Prices test classes defined with only daily and only intraday intervals. - tests added to `test_base` to verify errors raised if base intervals or base limits not defined. PriceMock class deconstructed to provide for defining new `PricesMockIntradayOnly` and `PricesMocDailyOnly` classes. - tests added to `test_base` to verify error raised if `session_prices` or `close_at` called when no daily interval defined.
- Loading branch information
Showing
5 changed files
with
514 additions
and
132 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Oops, something went wrong.