mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-03 22:22:34 +08:00
Merge pull request #1114 from quantopian/handle-data-optional
ENH: make handle_data optional
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user