BUG: Fix bad attribute lookup on session continuous future reader.

Use `roll_style` not `roll`.

Also, add test case to cover using the session bar reader `get_value`,
by adding a test which uses `close`, since only `contract` was being
exercised, which does not exercise the session daily bar reader.
This commit is contained in:
Eddie Hebert
2016-11-08 15:48:28 -05:00
parent b5d4df6223
commit 512e62b13e
3 changed files with 27 additions and 3 deletions
+1 -1
View File
@@ -135,7 +135,7 @@ class ContinuousFutureSessionBarReader(SessionBarReader):
If the given dt is not a valid market minute (in minute mode) or
session (in daily mode) according to this reader's tradingcalendar.
"""
rf = self._roll_finders[continuous_future.roll]
rf = self._roll_finders[continuous_future.roll_style]
sid = (rf.get_contract_center(continuous_future.root_symbol,
dt,
continuous_future.offset))