mirror of
https://github.com/wassname/catalyst.git
synced 2026-08-05 12:50:21 +08:00
BUG: Fixes BcolzMinuteBarMetadata to read the version correctly (#1425)
We were mistakenly using the minute_per_day field. We now expose from the metadata object the version from which the metadata was read. This allows a new test that verifies the version is read correctly.
This commit is contained in:
@@ -36,6 +36,7 @@ from pandas import (
|
||||
)
|
||||
|
||||
from zipline.data.minute_bars import (
|
||||
BcolzMinuteBarMetadata,
|
||||
BcolzMinuteBarWriter,
|
||||
BcolzMinuteBarReader,
|
||||
BcolzMinuteOverlappingData,
|
||||
@@ -88,6 +89,13 @@ class BcolzMinuteBarTestCase(WithTradingCalendars,
|
||||
)
|
||||
self.reader = BcolzMinuteBarReader(self.dest)
|
||||
|
||||
def test_version(self):
|
||||
metadata = self.reader._get_metadata()
|
||||
self.assertEquals(
|
||||
metadata.version,
|
||||
BcolzMinuteBarMetadata.FORMAT_VERSION,
|
||||
)
|
||||
|
||||
def test_write_one_ohlcv(self):
|
||||
minute = self.market_opens[self.test_calendar_start]
|
||||
sid = 1
|
||||
|
||||
Reference in New Issue
Block a user