GitHub PullRequestReviewCommentEvent at 2014-03-29 12:19:39
Repository: zipline
Actor: ehebert
Payload: {"comment":{"url":"https://api.github.com/repos/quantopian/zipline/pulls/comments/11093144","id":11093144,"diff_hunk":"@@ -506,3 +506,23 @@ def test_order_methods(self):\n             **self.zipline_test_config)\n \n         output, _ = drain_zipline(self, zipline)\n+\n+\n+class TestHistory(TestCase):\n+    def test_history(self):\n+        history_algo = \"\"\"\n+from zipline.api import history, add_history\n+\n+def initialize(context):\n+    add_history(10, '1d', 'price')\n+\n+def handle_data(context, data):\n+    df = history(10, '1d', 'price')\n+\"\"\"\n+        start = pd.Timestamp('1991-01-01', tz='UTC')\n+        end = pd.Timestamp('1991-01-15', tz='UTC')\n+        source = RandomWalkSource(start=start,\n+                                  end=end)\n+        algo = TradingAlgorithm(script=history_algo, data_frequency='minute')\n+        output = algo.run(source)\n+        output","path":"tests/test_algorithm.py","position":23,"original_position":23,"commit_id":"84d73ede10b8d7426339a60bb96a70c69604fbaa","original_commit_id":"84d73ede10b8d7426339a60bb96a70c69604fbaa","user":{"login":"ehebert","id":185744,"avatar_url":"https://avatars.githubusercontent.com/u/185744?","gravatar_id":"0d61bf69a12fc697ce718ae18ec0c45c","url":"https://api.github.com/users/ehebert","html_url":"https://github.com/ehebert","followers_url":"https://api.github.com/users/ehebert/followers","following_url":"https://api.github.com/users/ehebert/following{/other_user}","gists_url":"https://api.github.com/users/ehebert/gists{/gist_id}","starred_url":"https://api.github.com/users/ehebert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ehebert/subscriptions","organizations_url":"https://api.github.com/users/ehebert/orgs","repos_url":"https://api.github.com/users/ehebert/repos","events_url":"https://api.github.com/users/ehebert/events{/privacy}","received_events_url":"https://api.github.com/users/ehebert/received_events","type":"User","site_admin":false},"body":"Should this be an assert that `output` exists?","created_at":"2014-03-29T12:19:39Z","updated_at":"2014-03-29T12:19:39Z","html_url":"https://github.com/quantopian/zipline/pull/315#discussion_r11093144","pull_request_url":"https://api.github.com/repos/quantopian/zipline/pulls/315","_links":{"self":{"href":"https://api.github.com/repos/quantopian/zipline/pulls/comments/11093144"},"html":{"href":"https://github.com/quantopian/zipline/pull/315#discussion_r11093144"},"pull_request":{"href":"https://api.github.com/repos/quantopian/zipline/pulls/315"}}}}