From cbb8e28f8ea2736456e05868601ac6c0bf544a70 Mon Sep 17 00:00:00 2001 From: Thomas Wiecki Date: Wed, 17 Sep 2014 18:17:36 +0200 Subject: [PATCH] TST: Fix history unittest. --- tests/test_history.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/test_history.py b/tests/test_history.py index 129b11f6..968d9014 100644 --- a/tests/test_history.py +++ b/tests/test_history.py @@ -395,7 +395,6 @@ def handle_data(context, data): assert_frame_equal(expected, received) def test_history_daily_data_1m_window(self): - bar_count = 3 algo_text = """ from zipline.api import history, add_history from copy import deepcopy @@ -404,9 +403,8 @@ def initialize(context): add_history(bar_count=1, frequency='1m', field='price') def handle_data(context, data): - prices = history(bar_count={bar_count}, frequency='1d', field='price') - context.history_trace.append(deepcopy(prices)) -""".format(bar_count=bar_count).strip() + prices = history(bar_count=3, frequency='1d', field='price') +""".strip() start = pd.Timestamp('2006-03-20', tz='UTC') end = pd.Timestamp('2006-03-30', tz='UTC')