Merge pull request #1125 from quantopian/enforce-sorted-on-minute-bars

BUG: Enforce sorted order on minutes to delete.
This commit is contained in:
Eddie Hebert
2016-04-12 15:18:30 -04:00
2 changed files with 5 additions and 2 deletions
+4 -1
View File
@@ -47,7 +47,10 @@ from zipline.data.minute_bars import (
from zipline.finance.trading import TradingEnvironment
TEST_CALENDAR_START = Timestamp('2015-06-01', tz='UTC')
# Calendar is set to cover several half days, to check a case where half
# days would be read out of order in cases of windows which spanned over
# multiple half days.
TEST_CALENDAR_START = Timestamp('2014-06-02', tz='UTC')
TEST_CALENDAR_STOP = Timestamp('2015-12-31', tz='UTC')
+1 -1
View File
@@ -695,7 +695,7 @@ class BcolzMinuteBarReader(object):
intervals = itree[start_idx:end_idx]
for interval in intervals:
ranges.append(interval.data)
return ranges
return sorted(ranges)
else:
return None