diff --git a/tests/test_algorithm.py b/tests/test_algorithm.py index a63830a4..1819e410 100644 --- a/tests/test_algorithm.py +++ b/tests/test_algorithm.py @@ -1357,6 +1357,7 @@ class TestAlgoScript(WithLogger, ZiplineTestCase): START_DATE = pd.Timestamp('2006-01-03', tz='utc') END_DATE = pd.Timestamp('2006-12-31', tz='utc') + DATA_PORTAL_USE_MINUTE_DATA = False BCOLZ_DAILY_BAR_LOOKBACK_DAYS = 5 # max history window length ARG_TYPE_TEST_CASES = ( diff --git a/tests/test_history.py b/tests/test_history.py index d76aea0c..4546d3d4 100644 --- a/tests/test_history.py +++ b/tests/test_history.py @@ -487,17 +487,17 @@ class MinuteEquityHistoryTestCase(WithHistory, ZiplineTestCase): # the thousands place. data[cls.MERGER_ASSET_SID] = data[cls.SPLIT_ASSET_SID] = pd.concat(( create_minute_df_for_asset( - cls.env, + cls.trading_schedule, pd.Timestamp('2015-01-05', tz='UTC'), pd.Timestamp('2015-01-05', tz='UTC'), start_val=8000), create_minute_df_for_asset( - cls.env, + cls.trading_schedule, pd.Timestamp('2015-01-06', tz='UTC'), pd.Timestamp('2015-01-06', tz='UTC'), start_val=2000), create_minute_df_for_asset( - cls.env, + cls.trading_schedule, pd.Timestamp('2015-01-07', tz='UTC'), pd.Timestamp('2015-01-07', tz='UTC'), start_val=1000), diff --git a/zipline/algorithm.py b/zipline/algorithm.py index 5ea3324a..9c135bc1 100644 --- a/zipline/algorithm.py +++ b/zipline/algorithm.py @@ -637,7 +637,7 @@ class TradingAlgorithm(object): ) ) equity_daily_reader = PanelDailyBarReader( - self.trading_environment.trading_days, + self.trading_schedule.all_execution_days, copy_panel, ) self.data_portal = DataPortal( diff --git a/zipline/testing/fixtures.py b/zipline/testing/fixtures.py index e4b5ebb0..fc729acb 100644 --- a/zipline/testing/fixtures.py +++ b/zipline/testing/fixtures.py @@ -663,9 +663,9 @@ class WithBcolzDailyBarReader(WithTradingEnvironment, WithTmpDir): # source from minute logic. 'volume': 'last' } - mm = cls.env.market_minutes - m_opens = cls.env.open_and_closes.market_open - m_closes = cls.env.open_and_closes.market_close + mm = cls.trading_schedule.all_execution_minutes + m_opens = cls.trading_schedule.schedule.market_open + m_closes = cls.trading_schedule.schedule.market_close for asset in assets: first_minute = m_opens.loc[asset.start_date]