From c7020a99457be4a2898a5c066de4a6af00fd09ac Mon Sep 17 00:00:00 2001 From: Eddie Hebert Date: Wed, 3 Aug 2016 13:20:54 -0400 Subject: [PATCH] TST: Use data portal fixture. Wire in data portal fixture for test data_portal, prepare for putting more coverage of results in test_data_portal suite. --- tests/test_data_portal.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/tests/test_data_portal.py b/tests/test_data_portal.py index 7cffd7c1..65be6383 100644 --- a/tests/test_data_portal.py +++ b/tests/test_data_portal.py @@ -14,21 +14,17 @@ # limitations under the License. from pandas.tslib import Timedelta -from zipline.data.data_portal import DataPortal -from zipline.testing.fixtures import WithTradingEnvironment, ZiplineTestCase +from zipline.testing.fixtures import ( + ZiplineTestCase, + WithDataPortal +) import pandas as pd # Note: most of dataportal functionality is tested in various other places, # such as test_history. -class TestDataPortal(WithTradingEnvironment, ZiplineTestCase): - def init_instance_fixtures(self): - super(TestDataPortal, self).init_instance_fixtures() - - self.data_portal = DataPortal(self.env.asset_finder, - self.trading_calendar, - first_trading_day=None) +class TestDataPortal(WithDataPortal, ZiplineTestCase): def test_bar_count_for_simple_transforms(self): # July 2015