Skip to content

Commit

Permalink
BUG: only infer delta if no delta is passed
Browse files Browse the repository at this point in the history
  • Loading branch information
llllllllll committed Nov 10, 2015
1 parent c1d69d7 commit 8a7e79a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions zipline/sources/test_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,9 @@ def __init__(self, env, *args, **kwargs):
self.count = kwargs.get('count', len(self.event_list))
self.start = kwargs.get('start', self.event_list[0].dt)
self.end = kwargs.get('end', self.event_list[-1].dt)
self.delta = kwargs.get(
'delta',
self.event_list[1].dt - self.event_list[0].dt)
self.delta = delta = kwargs.get('delta')
if delta is None:
self.delta = self.event_list[1].dt - self.event_list[0].dt
self.concurrent = kwargs.get('concurrent', False)

self.identifiers = kwargs.get(
Expand Down

0 comments on commit 8a7e79a

Please sign in to comment.