コード例 #1
0
 def test_write_ohlcv_content(self):
     result = self.bcolz_daily_bar_ctable
     for column in OHLCV:
         idx = 0
         data = result[column][:]
         multiplier = 1 if column == "volume" else 1000
         for asset_id in self.assets:
             for date in self.dates_for_asset(asset_id):
                 self.assertEqual(expected_bar_value(asset_id, date, column) * multiplier, data[idx])
                 idx += 1
         self.assertEqual(idx, len(data))
コード例 #2
0
 def test_write_ohlcv_content(self):
     result = self.bcolz_daily_bar_ctable
     for column in OHLCV:
         idx = 0
         data = result[column][:]
         multiplier = 1 if column == 'volume' else 1000
         for asset_id in self.assets:
             for date in self.dates_for_asset(asset_id):
                 self.assertEqual(
                     expected_bar_value(asset_id, date, column) *
                     multiplier,
                     data[idx],
                 )
                 idx += 1
         self.assertEqual(idx, len(data))