mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-16 11:18:11 +08:00
MAINT/TEST: Move to_utc from history_cases.py to test_utils.py.
This commit is contained in:
@@ -8,10 +8,7 @@ import numpy as np
|
||||
from zipline.finance.trading import TradingEnvironment
|
||||
from zipline.history.history import HistorySpec
|
||||
from zipline.protocol import BarData
|
||||
|
||||
|
||||
def to_utc(time_str):
|
||||
return pd.Timestamp(time_str, tz='US/Eastern').tz_convert('UTC')
|
||||
from zipline.utils.test_utils import to_utc
|
||||
|
||||
|
||||
def mixed_frequency_expected_index(count, frequency):
|
||||
|
||||
@@ -4,6 +4,12 @@ from zipline.finance.blotter import ORDER_STATUS
|
||||
|
||||
from six import itervalues
|
||||
|
||||
import pandas as pd
|
||||
|
||||
|
||||
def to_utc(time_str):
|
||||
return pd.Timestamp(time_str, tz='US/Eastern').tz_convert('UTC')
|
||||
|
||||
|
||||
def setup_logger(test, path='test.log'):
|
||||
test.log_handler = FileHandler(path)
|
||||
|
||||
Reference in New Issue
Block a user