class TestMarket(unittest.TestCase): def setUp(self): self.market = Market() self.provider = YahooProvider() pass def testMarketWindow(self): startDate = dt.date(2011,1,1) endDate = dt.date(2011,12,31) series = TimeSeries(startDate, endDate) symbols = self.provider.fetchSymbolList('SP5002012') window = MarketWindow(series, symbols) self.provider.setMarketWindow(window) self.assertEqual(len(series.timestamps), 252) self.assertEqual(len(self.provider.window.symbols), 501)
def setUp(self): self.market = Market() self.provider = YahooProvider() pass