MAINT: Standardize reader get value methods.

The daily/session bar reader's `spot_price` took the same parameters and
returned the same kind of output as the minute bar reader's `get_value`.

Standardize on one method to make a common interface, which may be
formally factored out in a later patch; to help enable writing reader
implementations or mixins which can be agnostic to the bar frequency.
This commit is contained in:
Eddie Hebert
2016-08-24 12:46:36 -04:00
parent 20f9241252
commit a3c1f4ce36
10 changed files with 38 additions and 40 deletions
+2 -2
View File
@@ -55,14 +55,14 @@ class WithPanelBarReader(WithAssetFinder):
cls.reader = PanelBarReader(trading_calendar, cls.panel, cls.FREQUENCY)
def test_spot_price(self):
def test_get_value(self):
panel = self.panel
reader = self.reader
for asset, date, field in product(*panel.axes):
self.assertEqual(
panel.loc[asset, date, field],
reader.spot_price(asset, date, field),
reader.get_value(asset, date, field),
)
def test_duplicate_values(self):