From 3c1eea4ca1c6dcabff81ab418ceff7da45375800 Mon Sep 17 00:00:00 2001 From: jfkirk Date: Thu, 3 Sep 2015 13:15:21 -0400 Subject: [PATCH] MAINT: Removes references to trading.environment --- tests/modelling/test_modelling_algo.py | 5 ----- tests/test_algorithm_gen.py | 3 --- zipline/assets/_assets.pyx | 5 ----- 3 files changed, 13 deletions(-) diff --git a/tests/modelling/test_modelling_algo.py b/tests/modelling/test_modelling_algo.py index e589ed04..39d071d0 100644 --- a/tests/modelling/test_modelling_algo.py +++ b/tests/modelling/test_modelling_algo.py @@ -203,11 +203,6 @@ class FFCAlgorithmTestCase(TestCase): # Do the same checks in before_trading_start before_trading_start = handle_data - # Create fresh trading environment as the algo.run() - # method will attempt to write data to disk, and could - # violate SQL constraints. - trading.environment = trading.TradingEnvironment() - algo = TradingAlgorithm( initialize=initialize, handle_data=handle_data, diff --git a/tests/test_algorithm_gen.py b/tests/test_algorithm_gen.py index bdd1fa58..5f869bac 100644 --- a/tests/test_algorithm_gen.py +++ b/tests/test_algorithm_gen.py @@ -208,9 +208,6 @@ class AlgorithmGeneratorTestCase(TestCase): Ensure the pipeline of generators are in sync, at least as far as their current dates. """ - # Ensure we are pointing to the TradingEnvironment for this class - trading.environment = AlgorithmGeneratorTestCase.env - sim_params = factory.create_simulation_parameters( start=datetime(2008, 1, 1, tzinfo=pytz.utc), end=datetime(2008, 1, 5, tzinfo=pytz.utc), diff --git a/zipline/assets/_assets.pyx b/zipline/assets/_assets.pyx index fe628f2f..e2189b91 100644 --- a/zipline/assets/_assets.pyx +++ b/zipline/assets/_assets.pyx @@ -232,7 +232,6 @@ cdef class Future(Asset): def __cinit__(self, int sid, # sid is required object symbol="", - object root_symbol_id = "", object root_symbol="", object asset_name="", object start_date=None, @@ -248,10 +247,6 @@ cdef class Future(Asset): self.expiration_date = expiration_date self.contract_multiplier = contract_multiplier - # Assign the expiration as the end_date if end_date is not explicit - if self.end_date is None: - self.end_date = expiration_date - def __str__(self): if self.symbol: return 'Future(%d [%s])' % (self.sid, self.symbol)