Merge pull request #1114 from quantopian/handle-data-optional

ENH: make handle_data optional
This commit is contained in:
Jean Bredeche
2016-04-13 09:31:41 -04:00
3 changed files with 16 additions and 6 deletions
+6 -2
View File
@@ -106,8 +106,8 @@ from zipline.test_algorithms import (
call_with_kwargs,
call_without_kwargs,
call_with_bad_kwargs_current,
call_with_bad_kwargs_history
)
call_with_bad_kwargs_history,
no_handle_data)
from zipline.testing import (
make_jagged_equity_info,
to_utc,
@@ -1494,6 +1494,10 @@ class TestAlgoScript(TestCase):
algo = TradingAlgorithm(script=noop_algo)
algo.run(self.data_portal)
def test_no_handle_data(self):
algo = TradingAlgorithm(script=no_handle_data)
algo.run(self.data_portal)
def test_api_calls(self):
algo = TradingAlgorithm(initialize=initialize_api,
handle_data=handle_data_api,