Skip to content

Commit

Permalink
MAINT: Use WithMakeAlgo in TestGetDatetime.
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott Sanderson committed May 8, 2018
1 parent f72d91f commit d208bde
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions tests/test_algorithm.py
Original file line number Diff line number Diff line change
Expand Up @@ -2549,16 +2549,16 @@ def order_stuff(context, data):
)


class TestGetDatetime(WithLogger,
WithSimParams,
WithDataPortal,
ZiplineTestCase):
class TestGetDatetime(zf.WithMakeAlgo, zf.ZiplineTestCase):
SIM_PARAMS_DATA_FREQUENCY = 'minute'
START_DATE = to_utc('2014-01-02 9:31')
END_DATE = to_utc('2014-01-03 9:31')

ASSET_FINDER_EQUITY_SIDS = 0, 1

# FIXME: Pass a benchmark source explicitly here.
BENCHMARK_SID = None

@parameterized.expand(
[
('default', None,),
Expand Down Expand Up @@ -2591,12 +2591,8 @@ def handle_data(context, data):
""".format(tz=repr(tz))
)

algo = TradingAlgorithm(
script=algo,
sim_params=self.sim_params,
env=self.env,
)
algo.run(self.data_portal)
algo = self.make_algo(script=algo)
algo.run()
self.assertFalse(algo.first_bar)


Expand Down

0 comments on commit d208bde

Please sign in to comment.